Jump to content

Script to alter an html tag


GNorrell

Recommended Posts

First, I'm not a programmer at all. My scripting experience is limited to setting up email and contact forms on some websites. I have a new photography forum, and we need a script to convert existing links to sales pages into code that will post in an SMF (2.0.6) forum.

 

So basically I need to allow members to input the code in the top tag, and output the code in the bottom tag.

 

//<a href='http://webaddress.html' size='20'><img src='webaddress2.html?id=5164335&width=250&height=166' alt='Photography Prints' title='Photography Prints' style='border: none;'</a>

 

 

//url=http://webaddress.html]alt=Photography Printshttp://webaddress2.html?id=5164335&width=250&height=166[/img][/url

 

I had to leave the enclosure brackets off in the bottom tag to keep the tag showing properly

Any help or suggestions would be greatly appreciated.

 

- Greg

Link to comment
Share on other sites

You mean you want to allow bbcode to be used in your SMF forum? SMF supports bbcodes and it should already be enabled by default..

 

What is your question? You maybe better of posting over at SMF support forum or see if there is a mod for you to use.

Edited by Ch0cu3r
Link to comment
Share on other sites

Thank you for responding. The forum accepts BBC Code. Most of the forum members are from FineArtAmerica.  Every image on FAA has a sales page (5.8 million of them and growing) with a link box at the bottom for members to copy the link to post on their websites and blogs.  I will post one of mine as an example in the bottom.  It's possible to manually convert the existing code tags to BBC, but BY FAR, most of my forum members can't manage that. Some can, some try and give up, and some don't even try. Hence the need to either develop a mod package for SMF (which I've requested in their forum), or a script to simply convert the links. If SMF allowed regular members to use html in posts, there would be no problem But for security reasons, only admins can use html.

 

<a href='http://greg-norrell.artistwebsites.com/featured/eagle-landing-greg-norrell.html' size='20'><img src='http://greg-norrell.artistwebsites.com/displayartworkartistwebsites.html?id=6582693&width=250&height=166' alt='Sell Art Online' title='Sell Art Online' style='border: none;'></a>

Link to comment
Share on other sites

Looks like the link got mangled. Will try again:

 

http://<a href='http://greg-norrell.artistwebsites.com/featured/eagle-landing-greg-norrell.html' size='20'><img src='http://greg-norrell.artistwebsites.com/displayartworkartistwebsites.html?id=6582693&width=250&height=166' alt='Sell Art Online' title='Sell Art Online' style='border: none;'></a>

 

That link is mostly correct except for the opening tag. Oops, looked right in preview. The correct link is in a box bottom right at the example page.

 

An example page from FAA is here:

Edited by GNorrell
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.