Forum Moderators: open

Message Too Old, No Replies

Need help, replacing tags

         

Dollface

12:38 am on Jul 21, 2007 (gmt 0)

10+ Year Member



Hi, I'm not sure if my question is possible but if you can help me please let me know.

Basically I have an existing community site built in Perl. On some of the pages, I use a remotely hosted tag board (like a shout box). The board is remotely hosted so the users have to type in their name when posting which is 1) annoying and 2) easy to get spammed.

The board code is pasted within a dynamic template page. On this dynamic page, I am able to call certain variables using some code snippets like the username for example would be: <!--username-->

What I am wondering is if it is possible (using maybe JavaScript or otherwise) to perform an operation that determines the <!--username-->, converts it to the actual username (ie: CodeGuy), inserts the username into the "name" textbox of the tag-board form and then de-activates the text box so that the name cannot be changed?

Am I going way over-board or is this possible? If you can help me I would REALLY appreciate it.

Thanks

[edited by: DrDoc at 2:07 am (utc) on July 21, 2007]

Dollface

12:41 am on Jul 21, 2007 (gmt 0)

10+ Year Member



what I meant by:
On some of the pages, I use a remotely hosted tag board (like a shout box). The board is remotely hosted so the users have to type in their name when posting which is 1) annoying and 2) easy to get spammed.

is that the tag-board is not connected to my database which is why they have to type in their name. But the board code is being inserted in one of my dynamic members area pages that can read snippets like <!--username-->

Just wanted to clarify that.

XtendScott

5:07 am on Jul 21, 2007 (gmt 0)

10+ Year Member



If I understand correctly, it should be possible.

If you can modify the dynamic template to add a global javascript variable:
vUserName = '<?php $userName?>';

Then have an onsubmit function get the global variable and if it isn't empty then insert into the "name" textbox before submition.

Dollface

10:56 pm on Mar 21, 2008 (gmt 0)

10+ Year Member



wow, its been a long time. Thanks for your help :)
I ended up simply placing my snippet as-is in the text field as the initial value and then made the field hidden :) This work great so users don't have to type their name nor came spam bots post in the board (yayyy!)

[edited by: Dollface at 10:56 pm (utc) on Mar. 21, 2008]