PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:how to include content without quotes? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:how to include content without quotes?


Warning >>> there is no article with id = 2
#5601
rleash (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
how to include content without quotes? 1 Year, 5 Months ago Karma: 0  
Hi,

First of all, this little plugin is SO useful, thank you so much!

I wanted to use it with javascript on my page, but the quotes and apostrophes make this impossible. for example, I want to put this in an article:

Code:
document.getElementById("myID").innerHTML = "  "
This works unless there are any quotes in content item 2, then the string is ended early. Is there something I can add to the code to fix this? Like using the php htmlspecialchars function within the plugin's php files?
 
  The administrator has disabled public write access.

#5602
rleash (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:how to include content without quotes? 1 Year, 5 Months ago Karma: 0  
That code didnt show up right

document.getElementById("myID").innerHTML = "[include_content_item 2 ]"
(subbing square brackets for curly ones)
 
  The administrator has disabled public write access.

#5603
kksou (Admin)
Admin
Posts: 1699
graph
User Online Now Click here to see the profile of this user
Re:how to include content without quotes? 1 Year, 5 Months ago Karma: 27  
Hi,

First of all, out of curiosity, why would you want to use document.getElementById("myID").innerHTML to insert the "include_content_item" tag?

I think this might not work for the following reason: this is a plugin. As the name suggests, a plugin is for use within an article. In an article, a plugin is being processed before the article is finally displayed in your browser. I believe the reason you use innerHTML is for use with some AJAX codes. However, by this time, the article has already been displayed. The plugin only gets processed BEFORE the article is displayed. Once the article has been displayed, the plugin will no longer run and hence the "include_content_item" does not gets processed at all...

Regards,
/kksou
 
  The administrator has disabled public write access.
#5604
rleash (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:how to include content without quotes? 1 Year, 5 Months ago Karma: 0  
I realize it sounds crazy :)

We are a theater, and have a slideshow module showing 2 images on the page at once. (basically like posters for the shows, 2 at a time). The module lets me put a caption below each image, but I want a link inside that caption which replaces the entire slide with the show's article, while leaving the second slide intact. Even better, I would like the show article to display on mouseover of each "poster", but I'm not sure if that's possible.
 
  The administrator has disabled public write access.
#5605
rleash (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:how to include content without quotes? 1 Year, 5 Months ago Karma: 0  
Also, there's no php/AJAX involved. just a javascript function run on an onclick event. And I can see in Chrome that it IS working and inserting the article into my javascript function... but the quotes and/or apostrophes break up the string.
 
  The administrator has disabled public write access.
#5606
rleash (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:how to include content without quotes? 1 Year, 5 Months ago Karma: 0  
Actually, nevermind.. I figured out a way today to get it to work, by using include content in the slide's description, then adding an onmouseover event to the slide's description to change its opacity.

Thank you, anyway!
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2012. kksou.com. All Rights Reserved