View Full Version : global new thread page
pipedreams
02-02-2006, 03:57 PM
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.
pipedreams
02-08-2006, 12:01 PM
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
ConqSoft
02-10-2006, 04:56 PM
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
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') . '";');
UPDATE: Brian was able to point me to the mistake. It's called 'allowposting' instead of 'open'.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.