The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
global new thread page
Is anyone aware of a hack on vb where there is a global new thread page?
In other words instead of going to a forum and then selecting new thread, that they first select "new thread" and then pick a forum - (say as a dropdown in the new thread page.) I'd imagine its a simple hack, but I have no time to go investigating it myself at the moment, so I be willing to pay for the right solution for my needs. |
#2
|
||||
|
||||
I found a workaround for this that will do above for me and I thought I might share it with others.
I have vbadvanced cpms 2.10 installed on vb 3.5.3. So I created a new page on the cpms with only a modified version of the forumlist module I changed the module it so that it goes to a new thread page for each forum instead of listing the forum threads. Example http://www.gcn.ie/forum/cmps_index.php?page=newthread |
#3
|
||||
|
||||
This is strange; I was just working on the same type of thing because of newbs that don't get how to create a new thread in the proper forum.
In any case, I was trying to modify your code so that if a forum is marked "Forum Is Open = No", then it would just display the text (no link). This is the code I'm using, but it never gets to the "else" part; ie, it thinks they're all Closed. Any ideas? Thanks Code:
function add_newthread_list($parentid = -1, &$ret, $permission = '') { global $vbulletin; global $stylevar, $vbphrase, $defaultselected; if (!($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview'])) { return; } if (empty($vbulletin->iforumcache)) { require_once(DIR . '/includes/functions_forumlist.php'); cache_ordered_forums(1, 1); } if (empty($vbulletin->iforumcache["$parentid"]) OR !is_array($vbulletin->iforumcache["$parentid"])) { return; } $ret.= "<ul>"; foreach($vbulletin->iforumcache["$parentid"] AS $forumid) { $forumperms = $vbulletin->userinfo['forumpermissions']["$forumid"]; if ((!($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew']) AND !$vbulletin->options['showprivateforums']) OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['showonforumjump']) OR !$vbulletin->forumcache["$forumid"]['displayorder'] OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['active'])) { continue; } else { $forum = $vbulletin->forumcache["$forumid"]; $ret.= "<li>"; if (!($forum['options'] & $vbulletin->bf_misc_forumoptions['open'])) { $ret.= "<span class=\"smallfont\">"." $forum[title_clean]"."</span>"; } else { $ret.= "<a class=\"smallfont\" href=\"newthread.php?f=$forumid\">"." $forum[title_clean]</a>"; } add_newthread_list($forumid, $ret, $forumperms); $ret.= "</li>"; } // if can view } // end foreach ($vbulletin->iforumcache[$parentid] AS $forumid) $ret .= "</ul>"; return $ret; } $adv_portal_newthread = ""; $adv_portal_newthread = add_newthread_list(-1, $adv_portal_newthread); $adv_portal_newthread = "$adv_portal_newthread"; eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_newthread') . '";'); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|