Welcome to Geeklog, Anonymous Tuesday, April 23 2024 @ 09:39 am EDT

Geeklog Forums

Unforseen Consequences (html tag problems in stories)


Status: offline

Roonast

Forum User
Newbie
Registered: 06/09/10
Posts: 7
stressed
Ill just post what I left on the front of my website, regarding users trying to post images into stories using HTML

All in this post can be seen on my site : http://www.loggedout.co.uk

Unless my friend who is handling story moderation has tidied it up by then, a bit of googling and you can see I'm not the only one to encounter this

-------------------------------------------------------------------------------------------
Hokay, so the site does not like HTML tags inside of stories at all!

So here's the temporary workaround while I mess around with trying to enable the code to work in the sites config array.

I've increased the maximum resolution of images to 640x480 since 160x160 just was not enough, please do not abuse this, choose your images wisely.

Another thing is to use Plain Text Formatting and upload your images along with your post.
I realise this makes it a bit time consuming, having to save and then select the image, but it is just temporary while the kinks are being worked out.

Using the images in your story/blog/post/review etc. is very simple, all you need to type for example:

[imagex] - lower case is important, x denotes image number (1, 2 ,3 etc.)

and depending how you want it aligned you can use either [imagex_right] or [imagex_left]

Ill work on enabling HTML tomorrow, first I must sleep!
Oh and it does not like certain characters, so if you find your story being cut-off after it has been posted, simply use a similar character until this is resolved!
---------------------------------------------------------------------------------------

So while the above is a workaround, it is not really very practical Frown

I did make an attempt at trying to add the html tags img and src to the allowed list in the admin part of the config.sys to no avail

Is there not an easy way to simply get rid off the restrictions on HTML as whole and just allow HTML to be used normally within the stories? It seems very restrictive towards the client-side of geeklog and really doesnt help with server-side work since a chunk of my content writing time tonight has instead gone towards trying to fix the array in config.php to allow "typically used" html code and in trying to recover my users posts which seem to have big problem with the triple dotted .'s and 's cutting off stories.

Below are the changes I made to the config.php file in trying to get it to work, I'm giving up for now and will resume my quest in the morning, anybody with some sage advice here would be most welcome Smile

Thanks!

-------------------------

First of I tried to add it into the user part of the config

'img' => array(),
'src' => array()

Then I tried the same thing except in the admin part

This didnt work so I ventured further to try and add the img and src tags following

'a' => array('href' => 1, 'img' => 1, 'src' => 1, 'title' => 1, 'rel' => 1),

Final attempt:

$_CONF['admin_html']['img'] = array('src' => 1, 'width' => 1, 'height' => 1, 'vspace' => 1, 'hspace' => 1,
'dir' => 1, 'align' => 1, 'valign' => 1, 'border' => 1, 'lang' => 1,
'longdesc' => 1, 'title' => 1, 'id' => 1, 'alt' => 1);

Here I attempted to add the src tag following img, as it does in html code since the previous tactic of defining src as its own code didnt plan out, this didnt work either Frown

Last ditch effort:
I've disabled the HTML filter since my root know what their doing Wink and still no joy at all! Linking an image in a story via HTML just does not work, or at least not in anyway that I know of

Any, and I mean ANY help would be incredible at this point!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm, so what exactly is your point? There's a reason why HTML is restricted - security. This is especially true for the img tag.

There's an FAQ entry about adding tags to the allowed list.

Some Geeklog versions have an option to allow all HTML for Root users. As of 1.7.0, that is a permission (htmlfilter.skip) and could be given to any user (well, not Anonymous, but you don't really want that anyway).

HTH

bye, Dirk
 Quote

Status: offline

Roonast

Forum User
Newbie
Registered: 06/09/10
Posts: 7
Problem solved, removed geeklog, installed joomla!
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Quote by: Roonast


Last ditch effort:
I've disabled the HTML filter since my root know what their doing Wink and still no joy at all! Linking an image in a story via HTML just does not work, or at least not in anyway that I know of


I didn`t check the whole post but this above works without problems. So I suppose you did a few things wrong without noticing it like rechanging changes.

Idea You can also disable html checking for story admins rather than only root admins by hacking line 3037 of lib-common.php to
Text Formatted Code
SEC_inGroup( 'Story Admin' ))

Dirk, this problem was a feature request, where has it gone??? http://project.geeklog.net/tracking/view.php?id=952
 Quote

All times are EDT. The time is now 09:39 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content