Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Widget:Forums Category names/links in cms for version 4.0.1 - omardealo Details »»
Widget:Forums Category names/links in cms for version 4.0.1 - omardealo
Version: 1.0, by omardealo omardealo is offline
Developer Last Online: Sep 2022 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.1 Rating:
Released: 02-13-2010 Last Update: Never Installs: 14
 
No support by the author.

Peace and mercy of God be upon you

Code:
Widget:Forums Category names/links in cms for version 4.0.1

by:
omardealo
http://www.7-secret.org/style.php?language=en

photo:


Example: in footer
www.7-secret.org

Code:

PHP Code:
ob_start();
  
$forum_get vB::$db->query_read("
    SELECT * FROM "
.TABLE_PREFIX."forum
   ORDER by forumid"
);
  
$output_bits '';
  while(
$forum vB::$db->fetch_array($forum_get))
  {
        
$output_bits .= '<a href="forumdisplay.php?'.$forum[forumid].'-'.$forum[title].'" style="text-decoration: none">'.$forum[title].'</a> 
<font color="#FF6600"><b>@</b></font> '
;
  }
  
$output $output_bits;
  
ob_end_clean(); 
Composition:
  • Goto Admincp->vBullietin CMS->Widgets->Create New Widget
  • Choose PHP Direct Execution as Widget's Type
  • Place a Title. eg Forums Category. Keep it short as this is what will appear as title on your pages.
  • Click Save
  • Click Configure on the right of the new created widget.
  • Remove the default code that appears. Be sure to not leave behind even a single letter.
  • Copy and Paste the code that you can find below.
  • Leave the template name as is (vbcms_widget_execphp_page)
  • Click Save
  • Goto Admincp->vBullietin CMS->Layout Manager
  • Click Go on the Default Layout
  • Add the Widget to your Layout
  • Click Save

Note:
Those who want to exclude specific Forums Category
use this code

PHP Code:
ob_start();
$excluded "1,2,3";
  
$forum_get vB::$db->query_read("
    SELECT * FROM "
.TABLE_PREFIX."forum
   WHERE forumid NOT IN (
$excluded) ORDER by forumid");
  
$output_bits '';
  while(
$forum vB::$db->fetch_array($forum_get))
  {
        
$output_bits .= '<a href="forumdisplay.php?'.$forum[forumid].'-'.$forum[title].'" style="text-decoration: none">'.$forum[title].'</a> 
<font color="#FF6600"><b>@</b></font> '
;
  }
  
$output $output_bits;
  
ob_end_clean(); 
In this line

PHP Code:
$excluded "1,2,3"
Replace 1,2,3 Forums Category number that you want to exclude

hack in arabic - الهاك باللغة العربية:
http://www.7-secret.org/showthread.php?t=213

Source in english :
http://www.7-secret.org/showthread.php?t=228

May God help you do not forget to pray for me and my parents back of the unseen

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
tbworld

Comments
  #2  
Old 02-14-2010, 12:50 PM
nomoreturn's Avatar
nomoreturn nomoreturn is offline
 
Join Date: Apr 2009
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working perfect thanks
http://www.mastdunya.com
Reply With Quote
  #3  
Old 02-14-2010, 01:32 PM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting omardealo, I'll be tagging this.
Reply With Quote
  #4  
Old 02-14-2010, 04:05 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nomoreturn@hotm View Post
Installed and working perfect thanks
http://www.mastdunya.com
very good , But delete the html codes of Forums Category names
Reply With Quote
  #5  
Old 02-14-2010, 07:28 PM
omardealo's Avatar
omardealo omardealo is offline
 
Join Date: Nov 2008
Location: egypt
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Front Range 4x4 View Post
Interesting omardealo, I'll be tagging this.
thnx man
Reply With Quote
  #6  
Old 08-07-2011, 04:28 PM
mikeinjersey mikeinjersey is offline
 
Join Date: Feb 2006
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nicely done, but i'd like a break <br> after each forum category...so their not all bunched together.

Maybe there's a newer version of this somewhere ?

also, i'd like my forum categories to be displayed in vbSEO format...clean URLs.. (like the rest of my forums are) not the default .php way.

any quick fix on this is much appreciated.
Reply With Quote
  #7  
Old 08-07-2011, 07:43 PM
mikeinjersey mikeinjersey is offline
 
Join Date: Feb 2006
Posts: 290
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nevermind, fixed with the following -


Quote:
ob_start();
$excluded = "1,2,3";
$forum_get = vB::$db->query_read("
SELECT * FROM ".TABLE_PREFIX."forum
WHERE forumid NOT IN ($excluded) ORDER by forumid");
$output_bits = '';
while($forum = vB::$db->fetch_array($forum_get))
{
$output_bits .= '<a href="http://www.mydomain.com/forum'.$forum[forumid].'" style="text-decoration: none">'.$forum[title].'</a>
<br /> ';
}
$output = $output_bits;
ob_end_clean();
replace mydomain.com with your domain name. This will make it so that you're URL's are seo'd as long as u have vbSEO installed.
Reply With Quote
  #8  
Old 07-03-2014, 03:19 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This still seems to work great on 4.2.2pl1 too.

I have been looking for something like this to add to my Contributors page BUT I reckon I can use the whole listing in a Social page I'm building.

What I love about it is that I can disclude all but the news input forums that have my rss feeds and current news Blocks in the CMS.

A bit of css and this would be cool, love to have top categories stand out some how and maybe be able to choose usergroups that can use it or it appears for.

Great way to get your forums up front if a publisher.:up:
Reply With Quote
  #9  
Old 07-03-2014, 04:30 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing.
Reply With Quote
Благодарность от:
omardealo
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:07 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.04263 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (2)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete