Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2006, 03:57 PM
pipedreams's Avatar
pipedreams pipedreams is offline
 
Join Date: Apr 2004
Location: Cork, Ireland.
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-08-2006, 12:01 PM
pipedreams's Avatar
pipedreams pipedreams is offline
 
Join Date: Apr 2004
Location: Cork, Ireland.
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Files
File Type: zip addnewthread.zip (1.3 KB, 7 views)
Reply With Quote
  #3  
Old 02-10-2006, 04:56 PM
ConqSoft's Avatar
ConqSoft ConqSoft is offline
 
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 686
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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') . '";');
UPDATE: Brian was able to point me to the mistake. It's called 'allowposting' instead of 'open'.
Reply With Quote
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 11:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06364 seconds
  • Memory Usage 2,202KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete