Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Norrell on November 24, 2013, 12:02:28 PM

Title: Enable html tag for members
Post by: Norrell on November 24, 2013, 12:02:28 PM
I have a new photography forum in which members need to post links from their FineArtAmerica accounts. Admins can use  tag, but members cannot. How is this adjusted? Any help would be appreciated. I realize doing this is regarded as security risk (not sure what specific risks though). But not being able to change this would require my using other software.

- Greg
Title: Re: Enable html tag for members
Post by: margarett on November 24, 2013, 12:07:51 PM
A link can be perfectly posted without HTML
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 12:15:00 PM
You have choices. You can use the img tag for linking images directly, you can use the url bbcode for linking to it. I'm not sure what you actually need beyond that.

As for 'security risk', the risk of using raw HTML is that your account could be taken over.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 12:31:50 PM
Hopefully I can post an example link. Every image on FineArtAmerica has an image link in the bottom corner for members to post in blogs and on FAA discussion boards. It works perfectly on Blogger sites, for example. I haven't found a way to make it work with our board.

If there's an alternate suggestion how to accomplish this, I'm all ears. Since it works on Blogger and FAA and they remain secure, it should be safely possible for our forum. Thanks again for any suggestions.

<a href='http://greg-norrell.artistwebsites.com/featured/lower-falls-from-red-rock-point-greg-norrell.html' size='20'><img src='http://greg-norrell.artistwebsites.com/displayartworkartistwebsites.html?id=2191443&width=249&height=166' alt='Art Prints' title='Art Prints' style='border: none;'></a>
Title: Re: Enable html tag for members
Post by: Gargoyle on November 24, 2013, 12:35:42 PM
That got butchered...

Maybe place it into the code tags so the link isn't so destroyed?
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 12:37:04 PM
[url=http://greg-norrell.artistwebsites.com/featured/lower-falls-from-red-rock-point-greg-norrell.html][img]http://greg-norrell.artistwebsites.com/displayartworkartistwebsites.html?id=2191443&width=249&height=166[/img][/url]

I should note, there have been a number of vulnerabilities in Blogger's history with respect to XSS and other nasties getting in through their filtering being compromised. Their filtering is, probably, secure these days - until the next thing comes along. By not actually using raw HTML, SMF automatically gets a free pass on these things.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 12:38:14 PM
<a href='http://greg-norrell.artistwebsites.com/featured/lower-falls-from-red-rock-point-greg-norrell.html' size='20'><img src='http://greg-norrell.artistwebsites.com/displayartworkartistwebsites.html?id=2191443&width=249&height=166' alt='Art Prints' title='Art Prints' style='border: none;'></a>
Title: Re: Enable html tag for members
Post by: Gargoyle on November 24, 2013, 12:39:49 PM
Ah Arantor decoded it!!

Thats how you would do it as he has shown above your post!!!

This way you get what you want while maintaining security!
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 12:44:02 PM
Thanks Arantor.  Enclosing the link within the Code tag doesn't display the link in the forum, just the code. I need to be able to display the code  An example of it working on a blog is at the link below
http://blog.qthecollection.com/
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 12:58:17 PM
QuoteEnclosing the link within the Code tag doesn't display the link in the forum

No, of course it doesn't. The code tag is for writing code, such that it won't be processed as bbcode or anything else. So I used it to show you what the code would look like.

It's really, really simple, you put the image URL in an img bbcode, you put that inside a url bbcode, job done. If you then need an example to show people, you put that in a code tag like I did above to show you what it would be.
Title: Re: Enable html tag for members
Post by: Illori on November 24, 2013, 01:04:04 PM
admin -> posts and topics -> bulletin board code enable basic html in posts

QuoteThis will allow the posting of some basic HTML tags:

    <b>, <u>, <i>, <s>, <em>, <ins>, <del>
    <a href="">
    <img src="" alt="" />
    <br />, <hr />
    <pre>, <blockquote>
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 01:07:16 PM
The HTML as given will not be accepted by the basic HTML routine.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 01:17:31 PM
Thanks Arantor. What might be simple to you is not necessarily so to most photographers. I have one member who figured out how to do the BBC Code method, though she complained that she could no longer edit her Alt-Title tags. The vast majority need to be able to hit a button and copy and paste a link. Anything short, and it's not going to happen.
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 01:21:50 PM
Then they should use the WYSIWYG editor which pretty much does that.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 01:29:39 PM
Any other recommendations would be greatly appreciated. I altered the subs.php file to include 'html' as a closable tag.  That didn't help.  There are plenty of forums where this is not an issue, such as the discussion forum for FAA.  Not being able to adjust this will require using a different software platform.
Title: Re: Enable html tag for members
Post by: margarett on November 24, 2013, 01:37:04 PM
That kind of blackmailing isn't appreciated, sorry... (If you don't do this we will use other software)

If SMF isn't suited for your needs, you'r welcome to try alternatives. Or you can ask for a mod that suits your needs. That's not how SMF works, for a reason.
Title: Re: Enable html tag for members
Post by: Kindred on November 24, 2013, 01:39:27 PM
also --- we will not tell people how to purposefully defeat the very basic security of SMF.

Allowing general users to include unparsed HTML it a HUGE security hole...  which is why we don't allow it for anyone except the admin.  You would give your general users full admin access to your site - why would you give them HTML?


Finally...   if you use the WYSIWYG editor, as arantor suggested, it will probably solve move of your problems
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 01:40:08 PM
My apologies Margarett. I'm not trying to blackmail anyone. And I am earnestly grateful for all who take the time to provide advice. I'm just surprised there's not a simple solution here and hence I'm worried I may have to go back to the drawing board.
Title: Re: Enable html tag for members
Post by: Kindred on November 24, 2013, 01:41:58 PM
see my post above.  there IS a simple solution
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 01:42:48 PM
QuoteI altered the subs.php file to include 'html' as a closable tag

And the security aspect is unchanged, fortunately.

QuoteThere are plenty of forums where this is not an issue, such as the discussion forum for FAA.  Not being able to adjust this will require using a different software platform.

Then use that software platform. Or take the advice already given that you've chosen to ignore.

QuoteMy apologies Margarett. I'm not trying to blackmail anyone. And I am earnestly grateful for all who take the time to provide advice. I'm just surprised there's not a simple solution here and hence I'm worried I may have to go back to the drawing board.

Except "if you don't help me I'll have to look at other forum solutions" is blackmail. It is no different to a member coming onto your site and saying "if you don't implement <this> I'll take my content elsewhere". It's still blackmail, pure and simple, trying to get you to do something.
Title: Re: Enable html tag for members
Post by: Chalky on November 24, 2013, 01:49:50 PM
I'm still trying to understand what you want to do that isn't covered by Wysiwyg editor.  Toggle to Wysiwyg using the (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmedia.simplemachinesweb.com%2Fsmf%2Fdefault%2Fimages%2Fbbc%2Ftoggle.gif&hash=8d4176fb384269a9f2664258b6a073d1d47611c3) button or set it as default for all your members in Admin > Configuration > Current Theme > Member Options > Change current options for all members using this theme > Show WYSIWYG editor on post page by default.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 02:05:11 PM
Thanks Chalkcat. I'm a photographer. To make a living, I've managed to produce a few websites. I am not accomplished as a web programmer at all. I managed to set this up a few days ago. Most of my forum members are from FineArtAmerica, and they want to post their image links. I tried toggling the WYSIWYG thing and got no where.

I meant no disrespect to anyone here. I imagine this is how some or most of you make your living.
Title: Re: Enable html tag for members
Post by: Chalky on November 24, 2013, 02:13:09 PM
Not me, I earn my living exchanging beans in a goldfish bowl.  I just do this for fun, same as most of us here - we don't get paid for this  ;)

What do you mean you "got nowhere" with Wysiwyg?  In what way does it not meet your needs?  Is this mod any help?  http://custom.simplemachines.org/mods/index.php?mod=2745
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 02:56:00 PM
I uploaded that mod and it failed to install (there was no 'Install' button for it in the package manager. Thanks for the suggestion.
Title: Re: Enable html tag for members
Post by: margarett on November 24, 2013, 02:57:59 PM
Just another thought: why can't they just post their images on a regular image hosting platform?
I'm not saying that you should change all your habits just because I say so... But why would an image needs to be hosted embed in a HTML page?

Quote from: Norrell on November 24, 2013, 02:05:11 PM
I imagine this is how some or most of you make your living.
How mistaken you are :P
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 03:02:52 PM
I've said it elsewhere, I will say it again... I actually turn down consulting contracts to make sure I have free time to give up on this project. The amount of ungrateful people I run into is surprising.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 03:16:11 PM
Margarett - There are hundreds of thousand of photographers trying to sell literally millions of images online. Our biggest challenge is getting potential customers to find our links where they can buy prints. So we embed those links everywhere we possibly can, tweaking keywords and title tags so that someone using a search engine to look for something specific ends up on our buy page.  We could use attachments or upload to galleries. That will get the image seen. But that doesn't usually get them sold.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 03:51:17 PM
This (if it works) is using the BBC Code.  Any idea how difficult it would be to install a script that automatically swaps for a particular post a new image, new link, and new tags ??

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgreg-norrell.artistwebsites.com%2Fdisplayartworkartistwebsites.html%3Fid%3D2191443%26amp%3Bwidth%3D498%26amp%3Bheight%3D332%26%23039%3B%2520alt%3D%26%23039%3BArt%2520Prints%26%23039%3B%2520title%3D%26%23039%3BArt%2520Prints%26%23039%3B%2520style%3D%26%23039%3Bborder%3A%2520none%3B&hash=40440f56488f777149deb7fcb74ea45a41ae2c07) (http://greg-norrell.artistwebsites.com/featured/lower-falls-from-red-rock-point-greg-norrell.html)
Title: Re: Enable html tag for members
Post by: margarett on November 24, 2013, 04:17:20 PM
This is what you posted
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgreg-norrell.artistwebsites.com%2Fdisplayartworkartistwebsites.html%3Fid%3D2191443%26amp%3Bwidth%3D498%26amp%3Bheight%3D332%26%23039%3B%2520alt%3D%26%23039%3BArt%2520Prints%26%23039%3B%2520title%3D%26%23039%3BArt%2520Prints%26%23039%3B%2520style%3D%26%23039%3Bborder%3A%2520none%3B&hash=40440f56488f777149deb7fcb74ea45a41ae2c07) (http://greg-norrell.artistwebsites.com/featured/lower-falls-from-red-rock-point-greg-norrell.html)
As you see, and as YOU posted, doable in SMF.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 04:20:42 PM
Thank you Margarett. Yes, I managed to do it.  I would expect more than 90% of my forum members would give up before getting it right.
Title: Re: Enable html tag for members
Post by: Chalky on November 24, 2013, 04:24:36 PM
Don't underestimate your members - anyone who can work a modern camera is already more technically-minded than I am  ;D
Title: Re: Enable html tag for members
Post by: kat on November 24, 2013, 04:27:04 PM
So's my cat. ;)

[/Thread-drift]
Title: Re: Enable html tag for members
Post by: Gargoyle on November 24, 2013, 04:28:02 PM
What about just enabling basic html through the admin tick box?  That should be okay right??
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 04:30:26 PM
I did that but it doesn't allow members to use the html tag.

@Chalkcat - maybe that's our problem, after learning our cameras, photoshop, lightroom and other software, we have no RAM left for other things.
Title: Re: Enable html tag for members
Post by: Chalky on November 24, 2013, 04:30:49 PM
Quote from: K@ on November 24, 2013, 04:27:04 PM
So's my cat. ;)

[/Thread-drift]

Oi  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fchalkcat.com%2FSmileys%2Ffantasticsmileys%2Fpoke.gif&hash=dd913858baf52a69a291cca4696daf56824f45cd)
Title: Re: Enable html tag for members
Post by: kat on November 24, 2013, 04:35:11 PM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fc018.gif&hash=dbf6b10ad78cd31a57feae3f0016b14d8d2c90fa)

Just to clarify...

When your members go to post, using the WYSIWYG editor, they can click on (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmedia.simplemachinesweb.com%2Fsmf%2Fdefault%2Fimages%2Fbbc%2Fimg.gif&hash=5f2b43122dc29a431d4be221a674b45de4f09c26) and it'll bring up a box thingy.

They paste the URL to the picture, in there, and click "Submit".

It really is that easy.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 04:45:52 PM
I've tried that without success. I click on the upward arrow icon far right, insert link, and get an error.  I can post a regular direct image link, just not the full one with the tags from the sales page.

If it's possible, please go to the waterfall link above, copy the link in the box bottom right, and try and repost with WYSIWYG.  Perhaps I'm just not doing it right.
Title: Re: Enable html tag for members
Post by: Gargoyle on November 24, 2013, 04:49:39 PM
Quote from: Norrell on November 24, 2013, 04:30:26 PM
I did that but it doesn't allow members to use the html tag.

@Chalkcat - maybe that's our problem, after learning our cameras, photoshop, lightroom and other software, we have no RAM left for other things.

Why do they need the html tag.. They can use the anchor tag and img tag which is all I saw they needed from your postings.  I guess I am a bit lost on how the link you provided would not work "as is" with that tick box checked.
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 04:50:37 PM
Apparently that's too complicated for them.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 04:52:42 PM
I would be most grateful if someone could demonstrate.
Title: Re: Enable html tag for members
Post by: Arantor on November 24, 2013, 04:56:51 PM
I'm seriously thinking that it would be better for you to find another forum software.
Title: Re: Enable html tag for members
Post by: kat on November 24, 2013, 05:00:50 PM
Can't they just right-click on the image, copy the image URL and paste that into the box, as I described?

If not, I have to agree with Arantor, with this one.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 05:04:26 PM
Yes, they can post a link to a specific image with WYSIWYG.  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fphotocamel.com%2Fgallery%2Fdata%2F7472%2Fmedium%2FGN8_6844Nsweb.jpg&hash=9172dad899e92ecda748d5ee5b295876e61bc97d)
The problem we've had is posting the link to specific sales pages with tags.  If someone can do it, please try from the waterfall page linked above, with the sales link at bottom right.
Title: Re: Enable html tag for members
Post by: kat on November 24, 2013, 05:09:27 PM
Ah... I see your problem.

Using IMG tags won't do the URL, too.

What you need, is this:

[url=http://greg-norrell.artistwebsites.com/featured/lower-falls-from-red-rock-point-greg-norrell.html][img alt="Lower Falls" title="Lower Falls"]http://greg-norrell.artistwebsites.com/displayartworkartistwebsites.html?id=2191443&width=498&height=332' alt='Art Prints' title='Art Prints' style='border: none;[/img][/url]

I seem to remember seeing a mod that does that, though...
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 05:11:19 PM
Thanks K. If you recall the mod, please let me know.
Title: Re: Enable html tag for members
Post by: kat on November 24, 2013, 05:18:35 PM
Problem is, the mod authors often give their mods names that don't, always, have much bearing on what they do and there're fifty pages to wade through, to try and find it. That's if it's even in the section I went to.

http://custom.simplemachines.org/mods/index.php?action=search;type=2

As I'm just about to hit the ol' hay, maybe you could wade through them?

If you find something, make sure it's for SMF v2, won't you? The one I seem to remember MIGHT have been for v1.
Title: Re: Enable html tag for members
Post by: Norrell on November 24, 2013, 05:19:16 PM
Thank you K. Will do.
Title: Re: Enable html tag for members
Post by: kat on November 24, 2013, 05:20:22 PM
Let us know how you get on, woncha? If you don't find anything, I'll have a butcher's, tomorrow. :)
Title: Re: Enable html tag for members
Post by: Norrell on November 25, 2013, 10:53:33 PM
I wasn't able to find an existing mod to do it. I tried a number of them that seemed close, but nothing did the trick. Still wondering how difficult it would be to add a script to accomplish what I need.... Suggestions are welcome.