<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:"\\\" problem (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:"\\\" problem
#1133
hpstudios (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Gender: Female High Frequency Guide Location: NYC
"\" problem 2 Years, 4 Months ago Karma: 0  
When site reviews are posted on the site, anything with an apostrophe gets three slashes. For example, "there's" becomes "there\\\'s" or "it's" becomes "it\\\'s."

How can I fix this?

I have version v.2.0.1.0b SEF.

Thanks in advance.
 
Report to moderator   Logged Logged  
 
High Frequency Guide.net- a growing directory of free shows, movies, and other online entertainment!
  The administrator has disabled public write access.
#1134
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:"\" problem 2 Years, 4 Months ago Karma: 9  
Where to fix this really depends on how the reviews were added, whether they were edited via the admin panel etc.. but in looking for potential causes I did spot that the review edit form doesn't strip the slashes the way it should ..

In file admin/reviews.php near line # 389 locate
Code:

<td class="text">Review: </td> <td><textarea class="small" name="Review" rows="7" cols="40"><?=$rows[Review]?></textarea></td>
Replace that last line with ...
Code:

cols="40"><?php echo stripslashes($rows[Review]);?></textarea></td>
If you are interested,, apostrophes are normally used as data delimiters in MySQL, to seperate one portion of a record from the nest. To store them in a MySQL database, they need to be preceded by a slash, so they are not mistaken for a delimiter. The trick is adding backslashes before entry, (which the script apparently does a fine job of) and stripping them before display, which in the case of the review editor was overlooked.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1135
hpstudios (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Gender: Female High Frequency Guide Location: NYC
Re:"\" problem 2 Years, 4 Months ago Karma: 0  
Thanks! The fix worked , but there is still another problem remaining related to this one.

In the "Featured Site" section (the area where random featured sites appear), reviews or site descriptions with an apostrophe have one slash instead of the three. So in that particular section "I've" becomes I\'ve. How can I fix this?
 
Report to moderator   Logged Logged  
 
High Frequency Guide.net- a growing directory of free shows, movies, and other online entertainment!
  The administrator has disabled public write access.
#1136
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:"\" problem 2 Years, 4 Months ago Karma: 9  
You'll need to determine the site ID# for those entries and jot them down. The site ID# will be the ending number of the URL you see in your browser's staus bar when you hover over the site's link .../out.php=ID=X

Then access the admin panel and click the "You have X new site reviews to validate." link.

You should get a form where you can enter the ID # and remove the slashes.

Alternatively you could browse the review table directly using PHPMyAdmin, and edit the records that need it.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1137
hpstudios (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Gender: Female High Frequency Guide Location: NYC
Re:"" problem 2 Years, 4 Months ago Karma: 0  
When I do that, there is nothing to edit. The apostrophes appear normally in the admin/ edit reviews panel (no slashes).

Incidentally, it's not just the reviews that have the extra slash in "the Site Reviews" but the site descriptions as well. Yet they appear perfectly fine on the page listings.
 
Report to moderator   Logged Logged  
 
High Frequency Guide.net- a growing directory of free shows, movies, and other online entertainment!
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008