Forum Moderators: coopster

Message Too Old, No Replies

Parsing php query to popup

         

bugbitten

1:34 pm on Oct 27, 2003 (gmt 0)

10+ Year Member



Hi,

I am relatively new to php and am currently trying to get a popup to work. Basically I run a photo sharing site and I'm using a pre-bought bit of php software that runs the site. It uses templates, where you can modify the html, which feeds into the php.

I am trying to modify one of these templates using a javascript, however I'm not getting the results I want from it. At the moment, this is the script I'm using:

<script>
<!--
Popup('showalbum_desc.php?aid={aid}', 'AlbumDescription{aid}', 600, 600);
//-->
</script>

This is working, however when it parses the Album description (ie a journal of someone's travel's) there is no paragraph formatting retained (i.e. all the text is joined together). I'm finding that apostrophe's are also appearing as ////'s.

Also I would like the Album name to be parsed to the <title></title>... at the moment it is just a scrappy long url.

If anyone is able to help, I would be ever so grateful! Mainly it is the formatting that's bugging me.

Thanks very much!

Travis.

jatar_k

5:15 pm on Oct 27, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld bugbitten,

Where is the description coming from, db?

you could use stripslashes [ca.php.net] to get rid of the escaping before apostrophes.

bugbitten

8:49 pm on Oct 27, 2003 (gmt 0)

10+ Year Member



Hi jatar,

Yes the description is coming from the database.

Currently there is a sub-routine (not sure if that's the right terminology) called {albummsg}. This is found in one of the templates and calls the description. However I've found that if I put this in the popup script it doesn't work. I'm assuming that it wouldn't be able to identify an exact entry from the database using this method. (?)

I can send you a screen capture of how it currently appears if that helps?

Thanks for your help!

jatar_k

10:35 pm on Oct 27, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you get an error message?
have you looked at how it uses this function in other parts?

It should work the same way in the popup since it's just a different page. Have you looked to see if you are including all the necessary files that the script may need?

So it works just fine if you don't put it in the popup? I would look for differences output functions. See how it is being output in other places and then see if there is any difference to how you are trying to do it in the popup.

bugbitten

8:46 am on Oct 28, 2003 (gmt 0)

10+ Year Member



Hi,

There is no error occurring, there is just no popup, popping up...

I think you may be right about not having all the right files that the script needs. I'm just unsure which files this {albummsg} function uses. Is there anyway to find out?

jatar_k

5:14 pm on Oct 28, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



is it used somewhere else in the code? It must be somewhere.

Look at another script which is using it and look at the top of it (where includes normally are) or just search it for include statements.

look at how it handles the output from that function on that other script as well and make sure you are doing the same things on output.