Page 2 of 2

Posted: Thu Aug 03, 2006 2:55 pm
by garvinhicking
Hi!

In another thread we realized that someone was using the "utf8-binary" collation for the mysql connection. Using binary collations always leads to case sensitive search, thus you need to switch your connection to just "utf8" for mysql. Your server admin should be able to do that.
Where is the file located at? I'am right, that i need to have ftp-access to the server, to modify this file?
Yes, you need FTP access for that. The .tpl file should be in the serendipity_event_staticpage plugin directory.

Best regards,
Garvin

Posted: Mon Aug 07, 2006 7:17 pm
by urmelchen
garvinhicking wrote: In another thread we realized that someone was using the "utf8-binary" collation for the mysql connection. Using binary collations always leads to case sensitive search, thus you need to switch your connection to just "utf8" for mysql. Your server admin should be able to do that.
Okay, i will submit this information to the admin. You was asking for the mysql version: mysql Ver 14.7 Distrib 4.1.10a, for pc-linux-gnu (i386) (on Ubuntu Hoary).
Where is the file located at? I'am right, that i need to have ftp-access to the server, to modify this file?
Yes, you need FTP access for that. The .tpl file should be in the serendipity_event_staticpage plugin directory.[/quote]

There is no way at the moment to get access to the file. I suggest the result page should not display images by default, because of possible layout crap. Maybe you can change the default setting to someting like this (like search in articles work)?

Posted: Tue Aug 08, 2006 11:00 am
by garvinhicking
Hi!

Hm, we can't really strip that option easily. Many people want their complete entry texts to show up there...I think the default situation should be to display the entry as is.

Sadly s9y relies on template files for customization purposes, and introducing web-based editing of .tpl files might create security concerns...so I actually don't really know what to do :)

Best regards,
Garvin

Posted: Wed Aug 09, 2006 7:14 pm
by urmelchen
I easily can live with the default, if the template works correctly ;-) Why my layout is getting so destroyed? I'am using standard s9y functions to implement pictures.

Posted: Thu Aug 10, 2006 2:07 pm
by garvinhicking
Hi urmelchen!

Could you show us a screenshot and give the URL plus what to search for to see what you mean? Maybe I didn'T get the problem properly.

Regards,
Garvin

Posted: Fri Aug 11, 2006 6:30 pm
by urmelchen
Hi Garvin,
for sure. Try this search (search gaehn.org for "Gotha") and you will see this result page:

Image

Posted: Sun Aug 13, 2006 12:59 pm
by garvinhicking
Ah!

Now I See!

Well, the problem is this: The staticpage search uses the smarty "truncate" function to limit the output of the text to X characters.

Now in your case, the HTML is broken in the middle, because it is truncated. This leads to invalid formatting.

So the solution would be to either NOT truncate the staticpage search (but that would result in HUGE pages) or to create a truncate function that first strips HTML. I think the latter is better, but it would remove all HTML formatting in the result page of course...what do you tihnk?

Best regards,
Garvin

Posted: Mon Aug 14, 2006 7:39 pm
by judebert
If you're up to a little template editing, you might be able to get a better solution.

First edit or create the config.inc.php in your template directory. Add the Smarty HTML truncating code found here. Then find the {$<whatever>|truncate} call and change it to {$<whatever>|html_substr} instead.

Posted: Tue Aug 15, 2006 6:00 pm
by urmelchen
garvinhicking wrote:Ah!
Now I See!
Fine :-)
So the solution would be to either NOT truncate the staticpage search (but that would result in HUGE pages) or to create a truncate function that first strips HTML. I think the latter is better, but it would remove all HTML formatting in the result page of course...what do you tihnk?
IMHO it would be the best to remove html formattings from the result page (imho they are not needed there). I'm sure that there are more users out there, they actualy did have this problem.

Posted: Tue Aug 15, 2006 10:24 pm
by judebert
To remove the tags, you could edit your template, too. Just find the ${<whatever>|truncate...} call and change it to {$<whatever>|strip_tags|truncate...}.

Posted: Thu Aug 17, 2006 9:54 pm
by urmelchen
judebert wrote:To remove the tags, you could edit your template, too. Just find the ${<whatever>|truncate...} call and change it to {$<whatever>|strip_tags|truncate...}.
judebert, you are right. But i don't have access to the server. s9y is hosted by another team member of the kubuntu.de community.

Posted: Fri Aug 18, 2006 1:11 pm
by garvinhicking
Hi!

I added a |@escape modifier to the default staticpage tpl file. I'm afraid "strip_tags" would trigger the Smarty Security alarm, because strip_tags is a native PHP function?

Best regards,
Garvin