Recent Topics

1 Dec 03, 2005 18:01    

Ok, I've scoured the forums regarding this issue and gone through a number of skins to whittle it down to what I know (I think), what I got and what I cannot seem to understand.

What I know (I think):
you need to have the javascript for popups included in your head tag of _main.php http://b2evolution.net/man/2004/07/06/pop_up_howto

What I got:
blog with edited skin here: popup does not work
http://testing.nthview.com/index.php?blog=6&skin=nth
same blog originalb2 skin here: popup does work
http://testing.nthview.com/index.php?blog=6&skin=originalb2

What I cannot seem to understand:
[u]One:[/u] the originalb2 skin does not follow the guidline in the manual (link above) see source code of blog above
[u]Two:[/u] both _main.php blog skins use the same comments code

<?php $Item->feedback_link( 'comments' ) // Link to comments ?>


[u]Three:[/u] the originalb2 comments show in source like this:

<a href="http://testing.nthview.com/index.php?blog=6&amp;title=navtree_expandable_hack&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1&amp;template=popup#comments" title="Display comments / Leave a comment" onclick="b2open(this.href); return false">Leave a comment</a>


While the edited skin above produces this:

<a href="http://testing.nthview.com/index.php?blog=6&amp;title=navtree_expandable_hack&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#comments" title="Display comments / Leave a comment">Leave a comment</a>	

So in the end I've got two skins on the same blog using the same initial code for comments getting two different results. I know there is something I'm missing and I just cannot seem to locate the answer within the forums although I'm sure it is here.

Help Appreciated.

2 Dec 03, 2005 18:56

I just added

<?php comments_popup_script() // Uncomment to include javascript to open pop up windows ?>

to the head section of my phoenix installation's custom skin then grabbed _popup.php from phoenix's originalb2 skin and now have popup comments. Never actually did it before because I'm not into popup comments, but it seems to work for me.

One issue I noticed is that when you grab the popup.php file it'll call for the layoutb2.css file, which probably doesn't exist. Reckon one would want to do something about that eh?

I allowed javascripts from your site long enough to see that your popup code works on the second link, but I get a failure message telling me it can't find a file in the b2evocore folder. I'm thinking that means you're using an older version of _popup.php, or somehow have a mix of old-way and new-way. On your first link I don't see the popup script in the head section so that's a path to revisit.

3 Dec 03, 2005 20:12

Thanks for the prodding to take a fresh look!

Here's what I discovered: I'd been using direction from this posting http://b2evolution.net/man/2004/07/06/pop_up_howto along with a comment in that posting. There is direction to add a bit of javascript controls to the PHP comments_popup_script (this caused my problems) once I removed the 'extra stuff' my edited skin worked fine.

So now I have the comments_popup_script code you suggest and the _popup.php in that skins folder and all is good.

Add on Question:
It would be nice to be able to control the popup box (size, scroll bar, etc...) where is the proper place to implement those controls?

Thanks again!


Form is loading...