vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Favorite Threads in Profile Tab (https://vborg.vbsupport.ru/showthread.php?t=202122)

Head Roller 01-17-2009 02:09 PM

Favorite Threads in Profile Tab
 
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

Quote:

Originally Posted by Head Roller (Post 1715778)
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

Quote:

Originally Posted by dismas (Post 1715790)

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:

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

Quote:

Originally Posted by Head Roller (Post 1715867)
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:

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:

Code:

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.


All times are GMT. The time now is 01:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01044 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete