It is currently Sat Jan 16, 2021 7:58 am

All times are UTC + 5:30 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Nov 18, 2014 5:32 pm 

Joined :
Tue Nov 18, 2014 5:25 pm

Posts : 1
Hello,

I am using the Community Builder component with the Video Plus template, and was wondering how to access the "Register" and "Logout" links at the top of the template, either through code or through the administrator back end. What I am trying to do is replace the "my videos" link (which appears after the user has logged in) with the "my profile" community builder link, but I'm unable to figure out how to do this - - can someone help? :)

Why am I trying to do this instead of simply adding the "My profile" link to the main menu of my site? Well, because when I try and access the my profile link that way, the community builder headers appear outside the borders of the main video plus template, giving the site a disoriented and strange look. THIS is really the main issue I've been having - - are there any known formatting issues using Community Builder with your template?

Any help would be greatly appreciated!! :D


Report this post
Top
 Profile  
 
PostPosted: Thu Nov 20, 2014 10:29 am 
Apptha Team

Joined :
Tue Feb 21, 2012 12:15 pm

Responses Posted : 285
Hi,

Please note, we are not calling any menu items to the header menus. We have own links in template. To change the "Register", "Login", "My videos" and "Logout" links at the top of the header in videoplus template open \modules\mod_VideoPlusHeader\tmpl\default.php and find the following code.

if (USER_LOGIN == '1')

Here you can find the code to change links.

If you have any other queries feel free to contact us.


Report this post
Top
 Profile  
 
PostPosted: Thu Nov 20, 2014 11:30 am 

Joined :
Tue Nov 18, 2014 5:25 pm

Posts : 1
Hi Karthi

Thanks for the response - - much appreciated! I found the bit of code you were referring to, and I'll make whatever changes I need to there. Yes, I'll be sure and ask if I need more help.

Thanks again! :D


Report this post
Top
 Profile  
 
PostPosted: Thu Nov 20, 2014 12:37 pm 

Joined :
Tue Nov 18, 2014 5:25 pm

Posts : 1
Hi Karthi

Ok, one more question. As I mentioned before, I need a "My Profile" link at the top of the page (next to the "register" and/or "login/logout") links.

It needs to point to the following URL (when the user is logged in, of course): - ../index.php/cb-profile/userprofile.

How exactly should I implement this? I did the following in the "else" section of the code (i.e. if the user is logged in, and not a guest): -

<a href="../index.php/cb-profile/userprofile"> <?php echo JText::_('My profile'); ?> </a>

But, I'm not sure if this is correct, as I cannot see the "My Profile" link there ... as yet, at least.

Still working on this, but would appreciate any input you might have! :D


Report this post
Top
 Profile  
 
PostPosted: Mon Nov 24, 2014 10:53 am 
Apptha Team

Joined :
Tue Feb 21, 2012 12:15 pm

Responses Posted : 285
Hi,

If you want your users to view the link after logged in to the site, paste your code in else part. If your user want to see without login then you can place in main if condition.

For example your if condition will be look the below one.

if ($user->guest) {
if ($isEnable) {
$return = base64_encode ( JRoute::_ ( 'index.php?Itemid=' . $Itemid . '&amp;option=com_contushdvideoshare&amp;view=myvideos', false ) );
}

$return = isset ( $return ) ? $return : '';
?>
<input class="music_loginbtn" type="button"
value="<?php echo JText::_('HDVS_LOGIN'); ?>" name="loginbtn"
style="background: none;"
onClick="javascript:location.href = '<?php
echo JRoute::_ ( 'index.php?option=com_users&amp;view=login&amp;return=' . $return, false );
?>';" /> <input class="music_signupbtn" type="button"
value="<?php echo JText::_('HDVS_REGISTER'); ?>" name="signupbtn"
onClick="javascript:location.href = '<?php
echo JRoute::_ ( 'index.php?option=com_users&amp;view=registration', false );
?>';" />
<a href="<?php echo JURI::base (); ?>/index.php/cb-profile/userprofile"> <?php echo JText::_('My profile'); ?> </a>
<?php
}

And else part will be like the following code.

else {
$return = base64_encode ( JRoute::_ ( 'index.php?option=com_users&amp;view=login' ) );
?>
<form action="<?php echo JRoute::_('index.php', false); ?>"
method="post" id="music_logout">
<input type="hidden" name="option" value="com_users" /> <input
type="hidden" name="task" value="user.logout" /> <input
type="submit" class="music_loginbtn" name="Submit"
value="<?php echo JText::_('HDVS_LOGOUT'); ?>"
style="background: none;" /> <input type="hidden" name="return"
value="<?php echo $return; ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>
<?php
if ($isEnable) {
?>
<input class="music_loginbtn" type="button"
value="<?php echo JText::_('HDVS_MY_VIDEOS'); ?>" name="myvideos"
onClick="javascript:location.href = '<?php
echo JRoute::_ ( 'index.php?Itemid=' . $Itemid . '&amp;option=com_contushdvideoshare&amp;view=myvideos' );
?>';" />
<?php
}
?>
<a href="<?php echo JURI::base (); ?>/index.php/cb-profile/userprofile"> <?php echo JText::_('My profile'); ?> </a>
<?php
}


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 5:30 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron