vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   New Thread image as a button (https://vborg.vbsupport.ru/showthread.php?t=219338)

rockon 07-24-2009 10:21 AM

New Thread image as a button
 
I'm having some trouble making a submit button work to create a new thread in the FORUMDISPLAY template.

Here's the code i'm using:

Code:

<td class="smallfont"><if condition="$show['newthreadlink']">
<form method="link" action="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow">
<input type="submit" class="button" value="New Thread" />
</form>
<else />&nbsp;</if></td>

I'm not sure if the rel="nofollow" should be there but it doesnt work with or without it.

It just says "You did not select any valid threads" as you can see here:

http://www.rockonpublishing.co.uk/forumdisplay.php?f=5
(click the top new thread button)

Interestingly, I just noticed that from the button it links to this URL:

http://www.rockonpublishing.co.uk/in....php?forumid=5

but the original image at the bottom links to:

http://www.rockonpublishing.co.uk/ne...=newthread&f=5

which is what I want my button to do!

Any ideas?

Dismounted 07-24-2009 10:27 AM

The threadbits are actually part of the inline moderation form (the ticks down the right side). This is the root of the problem you are having.

rockon 07-24-2009 10:38 AM

I'm not very good with this. I'm unsure of where to edit to achieve a submit button as the new thread image and what code / link to use.

Can you help?

:)

--------------- Added [DATE]1248436562[/DATE] at [TIME]1248436562[/TIME] ---------------

No worries. I fixed it :)

Here's what fixed it:

Code:

<input type="button" name="create" value="New Thread" onClick="window.location='newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]'" class="button"/>
Thanks anyway! :)

sebaot 07-25-2009 04:02 PM

What I did was replace the img-code with a table with a table-cell containing the same background image I use for the navbar and put the text on it. You can also put the link within span-tags and put background-color and border attributes on it to make it look like a button.

But nevermind, now I see you got it to work. That's what a few beers does to me. :-)

rockon 07-30-2009 07:08 AM

Haha brilliant. Thanks for the advice though :)


All times are GMT. The time now is 02:29 PM.

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.00977 seconds
  • Memory Usage 1,717KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete