vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Forms Hack (https://vborg.vbsupport.ru/showthread.php?t=93970)

Abe1 12-04-2005 01:37 AM

Quote:

Originally Posted by Skyline_GT
I rename my $formname to mod_application

and when I try to go http://www.gamerzplanet.net/forums/n...od_application

Can you PM me a test username and pass?

RMS-Chef 12-04-2005 05:29 AM

Quote:

Originally Posted by SlimWicked
wow! This seems like a GREAT Hack..Now this is the one question I can't seem to find the answer to. Lets say I have a mp3 post forum and a form to submit info on the mp3. Now when someone enters the mp3 forum, were do I go or how do I edit the "Post a topic or start new thread button" so that is points to the

hxxp://www.mysite.com/newthread.php?do=Mp3Post

I just can't seem to figure this one out. Sorry if this is a dumb question. :ermm:

This is pretty easy. I searched for the post where I found the info but came up dry. I think I found it on vbulletin.com and it explained it better than I am about to.

Template is FORUMDISPLAY

Find this section of the default code:
Code:

        <td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
Now if you just have one forum where you want the New Thread button to go to a specific form intead of the regular editor, replace the above code with the code below.
Code:

        <td class="smallfont"><if condition="$show['newthreadlink']"><a href="<if condition="$foruminfo['forumid'] == XX">newthread.php?do=formXX<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if>" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
Make sure to replace XX in the $foruminfo['forumid'] == XX to the forum ID number of the forum you want this to happen in.
And change formXX to the name of your forum (in your case Mp3Post) that you want to be taken to when the button is clicked in that forum,


Now if you have more than one forum with more than one form you can do that too. Say you have your MP3 forum and a different movie forum, each with a different form you want it to go to when you click the New Thread button you just simply add more conditionals and closing if statements.

So for two of them you could use:
Code:

        <td class="smallfont"><if condition="$show['newthreadlink']"><a href="<if condition="$foruminfo['forumid'] == XX">newthread.php?do=formXX<else /><if condition="$foruminfo['forumid'] == YY">newthread.php?do=formYY<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if></if>" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
Now when you are in forum XX and click the New Thread button you will be taken to the forum formXX and when you are in forum YY and click the New Thread button you will instead be taken to formYY. Of course as with the first modifaction, you are are in any forum other than the one or two you are replacing, you will be taken to the normal new thread editor.

To do this with three or more different forums, just add:
Code:

<if condition="$foruminfo['forumid'] == XX">newthread.php?do=formXX<else />
in the appropriate spot and another closing:
Code:

</if>
before
Code:

" rel="nofollow">
for each new forum that you want the New Thread button's behavior to change.


I hope this is what you were asking for and I also hope I explained it well enough for you. Good Luck!

Skyline_GT 12-04-2005 06:33 AM

Quote:

Originally Posted by Abe1
Can you PM me a test username and pass?

test what? It doesn't require member to viwe that.

Abe1 12-04-2005 12:18 PM

Quote:

Originally Posted by Skyline_GT
test what? It doesn't require member to viwe that.

i got a no permissions page when I clicked on it.

KFrancesco 12-04-2005 01:20 PM

Hello,

I have a little problem with this hack, the title of all post generated are fixed (var $posttitle = "$formtitle"), how can I make to choose the title to the user?

Thank you

RMS-Chef 12-04-2005 02:13 PM

Quote:

Originally Posted by KFrancesco
Hello,

I have a little problem with this hack, the title of all post generated are fixed (var $posttitle = "$formtitle"), how can I make to choose the title to the user?


Thank you

Check posts #35 & #42 in this thread.

apdcanari 12-04-2005 02:54 PM

Hello,

I have an error.

Can you help me, please ?

Thanks,

Cédric :ermm:

apdcanari 12-04-2005 03:30 PM

Re,

The error is here.

forumid = 0

How change this ?

Thanks,

Cédric :ermm:

KFrancesco 12-04-2005 03:39 PM

Quote:

Originally Posted by RMS-Chef
Check posts #35 & #42 in this thread.

Perfect, how can I make to remove the variable "$question1" from the post but not to form?

Martyjp 12-04-2005 09:10 PM

Since upgrading long answers no longer show up, any ideas?


All times are GMT. The time now is 08:58 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.01463 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete