GNorrell Posted November 26, 2013 Share Posted November 26, 2013 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]http://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 https://forums.phpfreaks.com/topic/284305-script-to-alter-an-html-tag/ Share on other sites More sharing options...
Ch0cu3r Posted November 26, 2013 Share Posted November 26, 2013 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. Link to comment https://forums.phpfreaks.com/topic/284305-script-to-alter-an-html-tag/#findComment-1460247 Share on other sites More sharing options...
GNorrell Posted November 26, 2013 Author Share Posted November 26, 2013 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 https://forums.phpfreaks.com/topic/284305-script-to-alter-an-html-tag/#findComment-1460251 Share on other sites More sharing options...
GNorrell Posted November 26, 2013 Author Share Posted November 26, 2013 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: Link to comment https://forums.phpfreaks.com/topic/284305-script-to-alter-an-html-tag/#findComment-1460252 Share on other sites More sharing options...
Ch0cu3r Posted November 26, 2013 Share Posted November 26, 2013 You can enable basic HTML code in posts such as <a> and <img> within the AdminCP. Go to Admin Control Panel -> Post and Topics -> Bulletin Board Code tab and check "Enable basic HTML in posts" http://wiki.simplemachines.org/smf/Posts_and_Topics#Post_Settings Link to comment https://forums.phpfreaks.com/topic/284305-script-to-alter-an-html-tag/#findComment-1460253 Share on other sites More sharing options...
GNorrell Posted November 26, 2013 Author Share Posted November 26, 2013 Thank you. I've done that. It allows me and another admin to post such as the FAA links. But most members cannot. When I log in as a regular member, I can't post the links. Link to comment https://forums.phpfreaks.com/topic/284305-script-to-alter-an-html-tag/#findComment-1460254 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.