View Full Version : Favorite Threads in Profile Tab
Head Roller
01-17-2009, 02:09 PM
I would like to add an additional Tab to the User Profiles that holds "Favorite Threads". I was thinking that I could just move the Thread Subscriptions to a Profile Tab and Name the Tab "Favorites" but I got confused trying to figure out how to do this. Can someone point me in the right direction?
The bottom line of what we want to accomplish, is to make a members favorite threads visible to others who are visiting that members profile.
Thanks in advance.
iBardia
01-17-2009, 02:12 PM
Might be some coding. But I find no way to do this unless you put the users subscribed threads in tab on their profile.
Head Roller
01-17-2009, 02:16 PM
I agree. That will accomplish my goal. I am just not exactly sure how to go about it.
iBardia
01-17-2009, 02:18 PM
I agree. That will accomplish my goal. I am just not exactly sure how to go about it.
Hmm..
If you can find out somewhere how to make a profile tab, maybe you could copy the code from the Subscribed Threads page and paste it in the profile tab.
dismas
01-17-2009, 02:23 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=165554" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=165554</a>
That should get you started
Head Roller
01-17-2009, 03:54 PM
https://vborg.vbsupport.ru/showthread.php?t=165554
That should get you started
Yes... I had completed that and managed to create the Favorites tab. The problem is that I cannot figure out what part of the subscribed thread code to stick in there. I went to the USERCPSHELL template and found what I "THINK" is the code:
<tr><td class="$navclass[substhreads_listthreads]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=viewsubscription">$vbphrase[list_subscriptions]</a></td></tr>
<tr><td class="$navclass[substhreads_editfolders]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td></tr>
But when I add it to the hook, the tab disappears, so obviously I am doing it wrong.
iBardia
01-17-2009, 04:02 PM
Yes... I had completed that and managed to create the Favorites tab. The problem is that I cannot figure out what part of the subscribed thread code to stick in there. I went to the USERCPSHELL template and found what I "THINK" is the code:
<tr><td class="$navclass[substhreads_listthreads]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=viewsubscription">$vbphrase[list_subscriptions]</a></td></tr>
<tr><td class="$navclass[substhreads_editfolders]" nowrap="nowrap"><a class="smallfont" href="subscription.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a></td></tr>
But when I add it to the hook, the tab disappears, so obviously I am doing it wrong.
That is part of the User CP sidebar.
Lynne
01-17-2009, 04:06 PM
You need to make sure you do the query for those fields in your plugin.
Head Roller
01-17-2009, 04:36 PM
I went to the subscription.php and pulled the code for "view threads" and pasted it into the plugin. Nothing. I am inserting the code as follows:
function prepare_output($id = '', $options = array())
{
------->$this->block_data['favorites'] = 'Browse my favorite threads.';<------ Replacing this line
}
}
Is that correct?
Lynne
01-17-2009, 04:50 PM
I doubt you can just add some <tr><td> tags into the middle of a tab and have it work. You need to use valid html on a page or it will break. And is the $navclass variable available in that plugin? Did you define it? And how about $vbphrase? Did you make it global? I'm not sure if that is valid there. Dumb down your lines without those two things and see if you can get anything to output.
Head Roller
01-18-2009, 01:22 PM
I continued trying everything I could think of, but came up with nothing. I took the question to vBulleting.com and they said that it would require a custom code.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.