PDA

View Full Version : New Thread image as a button


rockon
07-24-2009, 10:21 AM
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:

<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/inlinemod.php?forumid=5

but the original image at the bottom links to:

http://www.rockonpublishing.co.uk/newthread.php?do=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 1248436562 at 1248436562 ---------------

No worries. I fixed it :)

Here's what fixed it:

<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 :)