vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   My Favorite Forums on the navbar (https://vborg.vbsupport.ru/showthread.php?t=71898)

Michael Morris 11-18-2004 04:45 PM

My Favorite Forums on the navbar
 
Hello. I admin two boards with 200+ forums. I'd like to be able to create a forums list for the users, and do it in templates. I have some idea of what's involved but am looking for advice on some specifics.

1) Create a text user profile field that can't be modified from the usercp.

2) Create an entry on the FORUMDISPLAY template that adds an option to "Add this forum to favorites" Link that to "forumdisplay.php?do=addfavorite&f=$forumid"

3) Have the PHP_Include template intercept the $_REQUEST['do'] and process by calling up the appropriate $bbuserinfo[field] and storing an array of all forumid's the user has clicked.

4) PHP_Inlcude start will pull the $bbuserinfo[field] and run a query to determine the names of the forums in the array - I'll need help with this query. The forum titles need to be in an associate array with their id's. Then PHP Include start will build a variable called $myfavorites that will later be called in the navbar.

5) Back in the forumdisplay template, a conditional will be put around the "Add this forum to favorites". If the forum's id is already in the $bbuserinfo array this link becomes a "Delete this forum from favorites"

6) PHP Inlude start will get a that do action as well.

7) Finally, the navbar will have the field "my favorites" that displays on the condition that $myfavorites isn't empty.

Anything I'm missing here?


All times are GMT. The time now is 12:58 AM.

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.01062 seconds
  • Memory Usage 1,704KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete