PDA

View Full Version : Popup not working?


Anonymous
02-01-2005, 08:30 PM
I thought I'd make my own template but I couldn't get the comment popup to work. My site's URL: http://www.rollingskies.com. I'd like the page to popup when "info and comment" is clicked, but that's not working right now. Can someone have a look and point me to the right direction in troubleshooting this thing? Thanks!

Anonymous
02-01-2005, 09:05 PM
In using your code you have already for the page. Copy and paste the line below:

<td width="300" align="left" valign="top"><COMMENT_POPUP></td>

And if you want to have it say 'info and comments' like you have it on your page. Just go to line 516 on your index.php
and find where it says 'Comments' and change it.

myra
02-02-2005, 03:00 PM
I have checked and I did code the template with the proper popup tag. What you see in my page's source code is <COMMENT_POPUP> being rendered, I think. But my template has the <COMMENT_POPUP> tag, so I'm not sure what else needs some tweaking. Is there a line or lines in index.php that might give me a clue what needs to fixed?

Anonymous
02-02-2005, 04:03 PM
What I think your doing wrong is that your linking your “info and comments” to <COMMENT_POPUP>. Get rid of “info and comments”. Don’t link any text to <COMMENT_POPUP>. Just add <COMMENT_POPUP> and nothing else.

<td width="300" align="left" valign="top"><COMMENT_POPUP></td>

Anonymous
02-03-2005, 05:16 AM
Hey thanks for your input, but I think I've found my solution here:
http://www.pixelpost.org/forum/viewtopic.php?t=182

I should've done a better job at searching before posting... :oops:

/myra/

marlyse
03-11-2005, 04:55 AM
When trying to implement the Comment Popup I ran into the first problems. Read pretty much every thread and followed with interest:

http://www.pixelpost.org/forum/viewtopic.php?t=182

My index.php file is hacked (mainly for the multiple-categories) but the needed code for the COMMENT_POPUP is in place as:

$tpl = ereg_replace("<COMMENT_POPUP>","<a href='#' onclick=\"window.open('index.php?popup=comment&showimage =$image_id','Comments','scrollbars=yes,'width=480, height=540');\">$lang_comment_popup</a>",$tpl);

Unfortunately that thread above does not show the solution to the problem. So I just used:

<a href="index.php?popup=comment" onclick="open('index.php?popup=comment','Comment','400px',' 600px'); return false">comments</a> (<IMAGE_COMMENTS_NUMBER>)

This seemed at first to work: http://www.marlyse.com/photocalendar but today I noticed that it will ALWAYS popup the latest image, not the currently selected one.

I noticed this problem only when testing the NO-COMMENT-SPAM solution, which I had to modify from the original to incorporate the index.php code of it into my own hacked index.php and what the coder had used in the image_template.html I incorporated into the comment_template.php file, thinking this should do the trick.

But this leads me to the 2nd problem: the NO-COMMENT-SPAM had worked fine for me when installed on a fresh index.php with no comment popups, but here now, it just always accepts the comments, with other words the security does not kick in. I have no idea where to start looking to solve this.

Woof... this has become a long posting! :oops: Anyway, I'd be very glad if anyone could help me with:

a) get the standard COMMENT_POPUP tag to work
b) get NO-COMMENT-SPAM addon to work via a popup comment

Thanks for any suggestions!

Connie
03-11-2005, 05:59 AM
hello, I wrote the no-commentspam-dingie..

please,
if you use different modification and "hacks" in one installation you can not expect that everything will work together

as far as I understand you problem you want the NO-COMMENTSPAM working with POPUP

that for I wrote the NO-COMMENTSPAM with two different templates
but I never crosstested it with other modification and for sure I will not test it with other modifications because this will lead to a never ending story :cry:

all these modifications are meant for experienced users who know what they do and understand the scripting, so if you use two different modifications in one installation you must check out whether there are collisions or not

but I don't have the time to follow everything what people do in their installations ;=)

marlyse
03-11-2005, 02:30 PM
Hi Connie - Hallo in Deutschland!

I am only using 3 modifications:

a) multiple categories
b) calarchive
c) no-comment-spam

These 3 should actually not interfere as far as I understand the code, it only means that I can not replace one index.php with another one and that I manually have to add the various code into one php file.

You say you supplied 2 different templates, but I only see the general one for image_template.html, I will search again the addon/modification area, maybe I missed your template for the popup?

Anyway, it's great work what you are doing and if I am not clear in what I am saying, sorry about that - if you would like I could email you in German the problem (if that helps) - I really do not think the code is interfering, it's rather that I am missing some code or put it into the wrong place in the template or something stupid like that.

Connie
03-11-2005, 03:59 PM
Marlyse,

sorry I mixed up myself, I posted two templates (decent - one with, one without popup), but the comment-spam for sure is only one template...

I was in a hurry and didn't take care.

So let me know how you continue, I am sorry I have no time in the moment to go too deep into it as I have some friends around me, consuming my time ;=)

good luck, viel Erfolg!

Connie

marlyse
03-11-2005, 05:05 PM
a) get the standard COMMENT_POPUP tag to work
b) get NO-COMMENT-SPAM addon to work via a popup comment

b) has been handled.

Connie, I went over the files with an application to merge files (which compares line by line of text) and found where I had missed a line or two of your code. Once that was in place, it works just fine in the comment popup!

a) I still have no solution unfortunately. Any ideas appreciated.

p.s. Hope you have a great evening with your friend C.!

marlyse
03-11-2005, 05:07 PM
Sorry, missed to point out in my last post that the URL has changed, in case somebody wants to peak, it's at:

http://www.marlyse.com/myview

Connie
03-12-2005, 07:29 AM
Marlyse,

well I compared the HTML which is produced by the tag <COMMENT_POPUP>
with the one which I used in my template "decent-popup"

open the index.php and look around line 516
$tpl = ereg_replace("<COMMENT_POPUP>","<a href='#' onclick=\"window.open('index.php?popup=comment&showimage =$image_id','Comments','width=480,height=540');\">$lang_comment_popup</a>",$tpl);


in your code it is only ".open" but what to open? the object is missing (window)
and the parameters for widht and height..

you can check it at http://www.bildgier.de/pp13popup/

http://www.bildgier.de/bilder/commentpopup.jpg

hope that helps

marlyse
03-12-2005, 03:28 PM
Thanks Connie for your suggestion. I think I need to clarify a few things:

a) the code in index.php which the COMMENT_POPUP tag "should" replace is correct (see my first posting on this subject, it is the same as you stated in your last reply, it includes the open.window etc.)

b) when I use the tag COMMENT_POPUP in my images_template.html, NOTHING happens, the string does not get replaced, no link shows up, nothing.

c) to have a popup, I am using my own hack (which uses solely 'open'). The popup does popup like that, i.e. I do get a popup.

d) the problem with my hacked popup is that it ALWAYS pops up the latest image comment window but not the one which is displayed (as no image_id is read into the opening of the popup and I would not know how to achieve that)

e) I would LOVE to have the standard COMMENT_POPUP work instead of trying to make a hack work.

Thanks.
-------------------------
Und hier auf Deutsch, einfach zur Sicherheit, damit ich klar bin :)

a) der original Kode in index.php welches der COMMENT_POPUP Tag ersetzen "sollte" ist korrekt (siehe hierzu meinen ersten Kommentar auf diesem Subjekt, der Kode ist genau wie Deiner, ausgenommen das ergänzte 'scrollbar=yes' Stück, es hat das open.window etc.)

b) wenn ich den Tag COMMENT_POPUP in meinem images_templates.html einsetze, passiert absolut NICHTS, der Tag wird nicht mit dem korrekten Kode ersetzt, kein Link zeigt sich, einfach nichts.

c) um überhaupt ein Popup zu haben, gebrauche ich meinen eigenen kleinen Hack (das ist der welcher nur 'open' gebraucht). Um klar zu sein, das Popup funktionier, i.e. ein Popup öffnet sich wenn ich diesen Hack gebrauche.

d) das Problem mit meinem gehackten Popup ist dass immer das gleiche Kommentar Fenster mit dem letzten Photo sich öffnet, jedoch nicht das Kommentar Fenster zum Photo welches aktiv gezeigt wird (kein image_id wird in mein gehacktes Popup gelesen, also das Problem ist mir schon klar, aber ich wüsste nicht wie das korrigieren)

e) ich würde VIEL LIEBER das standard COMMENT_POPUP tag gebrauchen anstatt zu versuchen meinen eigenen Hack zum funktionieren zu bringen. Aber ich weiss einfach nicht weshalb der Tag nicht mit dem korrekten Kode ersetzt wird.

Gruss aus Amerika von einer Ausland Schweizerin - jaja, die vielen Jahre hier machen mein Deutsch auch nicht besser :wink:

Connie
03-12-2005, 03:59 PM
Marlyse,

ich hab's verstanden. Das Problem liegt darin, dass die Tags, die du benutzen möchtest, zu der Zeit, wo das Popup geöffnet wird, nicht zur Verfügung stehen.. das ist ein Bug im index.php

ich denke morgen drüber nach, denke ich habe eine Lösung für dich und in der neuen Version, der wir uns nähern, ist das bereinigt!

raminia
03-12-2005, 04:21 PM
speak english plz!

-okapi-
03-14-2005, 04:03 PM
i just wanted to try out the comments popup on my local server invironment, but it didn't work for me either. the only effect is a new window opening as a blanc page, nothing to see on it.
i'm using the original index.php, not hacked and modified at all.
unfortunately this thread didn't bring a solution...
any other ideas?

marlyse
03-14-2005, 04:16 PM
Connie noted the other day (in German as an answer to me), that she is thinking about the problem and that she probably will have a solution which should be incorporated in the next version which seems to be close for release (very loosely translated what she said). With other words, hold in tight :P

-okapi-
03-14-2005, 04:41 PM
thank you marlyse,
i've read that reply (i'm from austria, speaking german too).
and i'm looking forward to the next version!
apart from that i'm asking myself why this comments popup works perfectly on other sites, like http://www.bldg13.com/photos/ ?

marlyse
03-14-2005, 04:45 PM
Yes, I wondered that myself too. Your situation seems to differ a bit from mine as yours "at least" opens a window, I don't' even get that far when using the tag. As to why it's white, I don't know, I assume you are using the Comment_template.html file. And as to why it works for some but not others, sorry, I have have no idea.

marlyse
03-24-2005, 10:41 PM
UPDATE:

As I was not able to get the default COMMENT_POPUP to work, I hacked a bit.

At first I had the problem that the comment window would always open on the current/latest photo, not the photo currently selected. But finally I found the solution, and now this hack works just fine - I didn't test it in many browsers, but Safari and OmniWeb work fine with it:


<a href="index.php?popup=comment&showimage=<IMAGE_ID>" onclick="open('index.php?popup=comment&showimage=<IMAGE _ID>','Comment','400px','600px'); return false">comments</a>


Maybe somebody else finds this useful too.