|
game descriptions ambersands
|
|
11-04-2009, 04:21 PM
(This post was last modified: 11-04-2009 04:25 PM by manos2000.)
Post: #1
|
|||
|
|||
|
game descriptions ambersands
Hi,
In some games at description appear ambersand glyphs like: Climb the world's tallest monuments and reach seventh heaven! What have to change to appear correctly? thank you Here after copy past appear correctly At site eg in word world's the "'" appears as & # 39 ; (with no spaces) thanks |
|||
|
11-04-2009, 07:11 PM
Post: #2
|
|||
|
|||
|
RE: game descriptions ambersands
So you want to change ' to that? htmlspecialchars function should do this, open file.php and change both
PHP Code: $file_row['description'] PHP Code: htmlspecialchars($file_row['description'], ENT_QUOTES, "UTF-8") PHP Code: $related_row['description'] PHP Code: htmlspecialchars($related_row['description'], ENT_QUOTES, "UTF-8") PHP Code: function shorten_description($description, $length) {PHP Code: function shorten_description($description, $length) { |
|||
|
11-04-2009, 07:13 PM
(This post was last modified: 11-04-2009 07:28 PM by manos2000.)
Post: #3
|
|||
|
|||
|
RE: game descriptions ambersands
thanks for fast reply, will try it today and will answer here
manos Hm, not working Maybe i did not write correctly the question I want description at site to appear: ' and not & # 39 ; ! and not & # 33 ; thanks manos |
|||
|
11-05-2009, 04:07 AM
Post: #4
|
|||
|
|||
|
RE: game descriptions ambersands
Although not an ideal solution (depends how many you have) select edit file and then simply click save, no need to change anything, the correct characters will be applied.
|
|||
|
11-05-2009, 04:18 AM
(This post was last modified: 11-05-2009 04:33 AM by manos2000.)
Post: #5
|
|||
|
|||
|
RE: game descriptions ambersands
Thanks for response.
Actually the problem is in printing Although & # 39 is the ampersand for ' , it prints the ambersand code and not ' thanks anyway manos Maybe i was not clear enough. So i uploaded an image to see my problem with script http://www.imagehack.biz/onarcade.jpg should be ' and ! and not these codes. Any help appreciated manos Maybe i was not clear enough. So i uploaded an image to see my problem with script ![]() should be ' and ! and not these codes. Any help appreciated manos |
|||
|
11-05-2009, 05:00 PM
Post: #6
|
|||
|
|||
|
RE: game descriptions ambersands
where do these tags come from? onArcade does not strip HTML tags in descriptions, so they should be displayed right... or have you added nohtml() function to descriptions?
|
|||
|
11-05-2009, 05:33 PM
Post: #7
|
|||
|
|||
|
RE: game descriptions ambersands
No i did not add anything.
But i saw also at other sites that at same games there are the same problems in description. thanks manos |
|||
|
11-05-2009, 08:04 PM
(This post was last modified: 11-05-2009 08:07 PM by manos2000.)
Post: #8
|
|||
|
|||
|
RE: game descriptions ambersands
Near to solution
The problem is the "amp;" 4 characters that should not exist. Without this the ambersand code is printing ok eg # 3 9 ; without spaces is printed as '. So need only to add at description printing something like replace(description,"amp;","") in asp. How is this command in php? thanks If not available i will write an asp script to replace at mysql all amp; with blanc manos |
|||
|
11-06-2009, 07:34 PM
Post: #9
|
|||
|
|||
|
RE: game descriptions ambersands
Do you have that & in your database? In that case running this query should fix it:
Code: UPDATE on_files SET description = REPLACE(description, '&', '&'); |
|||
|
11-07-2009, 05:38 AM
Post: #10
|
|||
|
|||
|
RE: game descriptions ambersands
This works, thanks Hans
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Help





![[Image: arcade_sig.jpg]](http://dazzlerweb.com/images/arcade_sig.jpg)
![[Image: hsg_banner.jpg]](http://www.dazzlerweb.com/images/hsg_banner.jpg)
![[Image: onarcade.jpg]](http://www.imagehack.biz/onarcade.jpg)