View Full Version : Hack Idea: Global Posting Button
What do you think about this -
When someone goes to click "new thread", they are able to CHANGE the forum that the post is going to go into. Let's say that someone clicks "new thread" in the hack suggestions area, but then decides it would be better in the installation section - they could just click and change it to post in that forum. (make sense)
This could eliminate quite a bit of people posting in the wrong forum (many because they don't want to have to go back out and find the forum they want to post in and click on "new thread" again).
Anyone else like this idea? Can anyone create this?
This is a neat idea... just above the post subject to have a combo-box with all the forums listed, allowing you to select the best one. Maybe with a little note next to it: "Please try to post to the most appropriate forum for this topic".
Shouldn't be too difficult?
-Chris
actually sounds like a good idea, never even crossed my mind before, but it could be pretty usefull.
I'm great at coming up with ideas for hacks (right Ed?), but don't ask me how to create them! :)
I know exactly what you mean, I haven't a clue how to make this stuff, thats strictly for other people to do, me, I just take their hard work and use it freely on my site ;)
I am planning on learning PHP soon though, so maybe I'll finally make some stupid little hack so I can call myself a "hacker"
Actually, that is a simple hack. Just make a forum dropdown (or maybe even use the one that's already generated) and use that to send the forumid.
If using the pregenerated one would work, I think it'd be all templates :D Otherwise, a litle hacking.
Ok, here we go.
But first, some user testimonial:
"Love it!" - Me2Be
Hehe, sorry, had to :D
Anyway, in newthread.php find:
if ($action=="newthread") {
$forumid = verifyid("forum",$forumid);
Under, add:
//CHOOSE FORUM HACK
$jumpforumbits="";
if ($forumid!="") {
$curforumid=$forumid;
} else {
if ($threadid!="") {
$getforumid=$DB_site->query_first("SELECT forumid FROM thread WHERE threadid=$threadid");
$curforumid=$getforumid[forumid];
}
}
$categorys=$DB_site->query("SELECT categoryid,title,displayorder FROM category WHERE displayorder<>0 ORDER BY displayorder");
while ($category=$DB_site->fetch_array($categorys)) {
$optionselected="";
$forums=$DB_site->query("SELECT forumid,title,displayorder FROM forum WHERE displayorder<>0 AND active=1 AND categoryid=$category[categoryid] ORDER BY displayorder");
$forumshown=0;
$tempjumpforumbits="";
while ($forum=$DB_site->fetch_array($forums)) {
if ($hideprivateforums==1) {
$getperms=getpermissions($bbuserid,$bbusergroupid, $forum[forumid]);
} else {
$getperms[canview]=1;
}
if ($getperms[canview]==1) {
$forumshown=1;
$jumpforumid=$forum[forumid];
$jumpforumtitle=" $forum[title]";
if ($curforumid==$jumpforumid) {
$optionselected="selected";
$selectedone=1;
} else {
$optionselected="";
}
eval("\$tempjumpforumbits .= \"".gettemplate("jumpforumbit")."\";");
} // end if $getperms...
} // end while
if ($usecategories==1 and $forumshown==1) {
$jumpforumid="";
$jumpforumtitle="";
eval("\$jumpforumbits .= \"".gettemplate("jumpforumbit")."\";");
if ($curforumid=="cat".$category[categoryid]) {
$optionselected="selected";
}
$jumpforumid="cat$category[categoryid]";
$jumpforumtitle="Category: $category[title]";
eval("\$jumpforumbits .= \"".gettemplate("jumpforumbit")."\";");
$optionselected="";
$jumpforumid="";
$jumpforumtitle="--------------------";
eval("\$jumpforumbits .= \"".gettemplate("jumpforumbit")."\";");
}
// add forum bits
$jumpforumbits.=$tempjumpforumbits;
}
$forumpick = $jumpforumbits;
//END CHOOSE FORUM HACK
Now, in the newthread template, add this where you feel fit (I added it under subject and fooled around with the alt colors):
<td><normalfont><B>Forum:</B></normalfont></td>
<td><SELECT name="forumid">$forumpick</SELECT> <smallfont>(Please choose an appropriate forum)</smallfont></td>
VERY IMPORTANT. Also in newthread template, scroll down towards the end, and find:
<INPUT TYPE="HIDDEN" NAME="forumid" VALUE="$forumid">
Replace with:
<INPUT TYPE="HIDDEN" NAME="OLDforumidOLD" VALUE="$forumid">
-----------
There you go! All done!
Now, if a user selects the "--------------" or a category from the dropdown, it will give an error saying that the forum doesn't exist, and if you followed a valid link, to email the webmaster. You might want to change this or you'll probably get emails saying "I couldn't post!!"
[Edited by Ed Sullivan on 08-02-2000 at 02:35 AM]
any forum where i can see this working ? want to see if it's something i would add to my forum:D
thanks
Originally posted by Ed Sullivan
But first, some user testimonial:
"Love it!" - Me2Be
Hehe, sorry, had to :D
LOL Mike! Funny ;)
Me2, Mike got this one done sooo quickly, maybe we should start making some more hack requests? hehehe
-Chris
Oh, don't ya worry Chris, I've got plenty (and he knows it) :)
Here's my latest idea
http://www.vbulletin.com/forum/showthread.php?threadid=2191
Ed, tried it out on my test board and it works great!!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.