Visitor Registration

Discuss PivotX 2.0.x here. Non-PivotX related discussions go in The Drain.

Visitor Registration

Postby abhind » Fri Feb 12, 2010 6:37 am

First of all...Thanks a lot for the superb Blog CMS !!!

Initially I installed Pivot. It had a provision for Visitor Registration while entering comments.
But now I have installed PivotX but I am not able to see any such feature of Visitor Registration.
Is this feature not yet present in PivotX or I am missing something?

Thanks,
Abhinav
abhind
 
Posts: 2
Joined: Fri Feb 12, 2010 5:25 am

Re: Visitor Registration

Postby abhind » Fri Feb 12, 2010 9:16 am

I just found a solution to the problem. Now, the link is appearing and the visitors can register and post comments.

Just in case, the registration link came after I added the following tag:
[[ register_as_visitor_link linktext="Register/Login" linktext_logged_in="Account profile" ]]

Thanks,
Abhinav
abhind
 
Posts: 2
Joined: Fri Feb 12, 2010 5:25 am

Re: Visitor Rsgistration

Postby lomi » Wed Jun 05, 2013 4:31 pm

Hello,

is there any way to display the commentform to registered visitors only? I didn't find any function which checks if a visitor is registered.
All what i found was this line:
if ($visitor = $visitors->isLoggedIn()) {
But of course this one wouldn't work in the template file. Maybe there's a similar line to implement in the template.

Thank you!
Lomi
lomi
 
Posts: 25
Joined: Fri Jun 17, 2011 6:27 pm

Re: Visitor Rsgistration

Postby Harm10 » Wed Jun 05, 2013 7:53 pm

You can use the template tag [[ registered ]] to check whether the visitor has logged in.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Visitor Rsgistration

Postby hansfn » Thu Jun 06, 2013 7:50 am

You can use the template tag to assigning a class to a div surrounding the comment form, and then you can use CSS to hide or display that div. Another (better?) solution is the following:

Code: Select all
        [[ capture name="registered" assign="registered" ]][[registered]][[ /capture ]]
        [[ if $registered == 'registered' ]]
            [[ commentform ]]
            <p>[[ register_as_visitor_link linktext_logged_in="Log out or view your account details" ]]</p>
        [[ else ]]
            <h4>[[ register_as_visitor_link linktext="Log in to post comments" ]]</h4>
        [[ /if ]]
hansfn
Developer
 
Posts: 3281
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Visitor Rsgistration

Postby lomi » Thu Jun 06, 2013 9:54 am

thank you for that code, its working perfectly ! :-)
lomi
 
Posts: 25
Joined: Fri Jun 17, 2011 6:27 pm


Return to 2.x Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron