boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Comments in different directory

 
Post new topic   Reply to topic    boardom Forum Index -> Template help
View previous topic :: View next topic  
Author Message
Marije



Joined: 08 Jul 2004
Posts: 6
Location: Somewhere...

PostPosted: Thu Jul 08, 2004 6:08 am    Post subject: Comments in different directory Reply with quote

Okay, my B2 is installed in a separate directory to my main site. I have the blog as a PHP include on the index file of the main site, but when I click on 'comments', it'll display 'page not found' because it's trying to look for 'commentspopupwhatever.php' in the directory my main site is in.

My question is; how/ where do I edit the settings so the comments link to the b2 directory?

Thanks. If you need the code, just ask Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address
Sigg3



Joined: 03 Jul 2003
Posts: 428
Location: Oslo, Norway

PostPosted: Thu Jul 08, 2004 1:09 pm    Post subject: Reply with quote

Using the include causes these sort of tricky tricks things.. Let's see..

Maybe you should activate the b2commentspopup in an alternative fashion? How about an ordinary <a href=""> link? I thinK

Code:
<a href="/yourdir/b2commentspopup.php?p=<?php the_ID() ?>&c=1" target="_blank">link</a>


the_ID is the number of the post, you see, and as long as this is kept within the b2loop.

To open as a pop-up (and I'm merely idling here) you could do this:

Code:
<A href="javascript:;" onClick="OpenBrWindow('/yourdir/b2commentspopup.php?p=<?php the_ID() ?>&c=1','Comments','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes','400','350','true')">


Now, the last three variables: width, height, the pop-up is centered acc. to screen (true/false).

(if you use this last one, remember to add this in the <head>)

Code:
<script language="JavaScript1.2">

/*
Open Centered Popup Window Script-
© DHTML Shock (www.dhtmlshock.com)
To add more shock to your site, visit www.DHTML Shock.com
*/

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

</script>


I stole the idea from http://www.dhtmlshock.com
_________________
Sigg3 dot net - because you're worth it! | b2 Cafelog Resource Center
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Marije



Joined: 08 Jul 2004
Posts: 6
Location: Somewhere...

PostPosted: Thu Jul 08, 2004 1:44 pm    Post subject: Reply with quote

Thanks for your reply.

Does this mean I have to do it manually for each entry, or does it automatically detect the ID if I put <?php the_ID() ?> in there?

Sorry, I'm a b2 newbie.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Sigg3



Joined: 03 Jul 2003
Posts: 428
Location: Oslo, Norway

PostPosted: Fri Jul 09, 2004 8:21 am    Post subject: Reply with quote

Whatever variable written to be inside the b2loop which is PLACED within the b2loop will be co-ordinated with the data in the designated databases.

In other words: the id will change for each post by itself:)
It's wonderful, isn't it?

I'm not sure wether this is the best solution, I see it as an alternative solution. Should work as good as anything, tho.

(The b2-loop is the cluster of codes concerning the actual print of the blog. Variables and such can be found at http://cafelog.com/readme.html)
_________________
Sigg3 dot net - because you're worth it! | b2 Cafelog Resource Center
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Marije



Joined: 08 Jul 2004
Posts: 6
Location: Somewhere...

PostPosted: Sun Jul 11, 2004 12:28 pm    Post subject: Reply with quote

It's not working...

Code:

Posted at <?php the_time() ?>. <A href="javascript:;" onClick="OpenBrWindow('b2/b2commentspopup.php?p=<?php the_ID()

?>&c=1','Comments','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes','400','350','true')">Comments</a>


Located here: http://soulmirror.net/b2
Back to top
View user's profile Send private message Visit poster's website AIM Address
Sigg3



Joined: 03 Jul 2003
Posts: 428
Location: Oslo, Norway

PostPosted: Mon Jul 12, 2004 8:20 am    Post subject: Reply with quote

Seems to work just fine to me???
You're using the comments_popup_link, right? "My" script don't count comments but yours do. Stick with it!

Should change the look of the template, though:)
_________________
Sigg3 dot net - because you're worth it! | b2 Cafelog Resource Center
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Marije



Joined: 08 Jul 2004
Posts: 6
Location: Somewhere...

PostPosted: Mon Jul 12, 2004 8:30 am    Post subject: Reply with quote

I tried other options myself, and changed the script. But the code you gave me, didn't work.

Thanks anyway
Back to top
View user's profile Send private message Visit poster's website AIM Address
Sigg3



Joined: 03 Jul 2003
Posts: 428
Location: Oslo, Norway

PostPosted: Tue Jul 13, 2004 9:15 am    Post subject: Reply with quote

Strange. Thought it would.

It wasn't a traditional solution, though. Just wanted to see wether it worked or not. And it really should.
_________________
Sigg3 dot net - because you're worth it! | b2 Cafelog Resource Center
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Marije



Joined: 08 Jul 2004
Posts: 6
Location: Somewhere...

PostPosted: Tue Jul 13, 2004 9:35 am    Post subject: Reply with quote

Weird..

It's okay, I figured another way out. Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address
Sigg3



Joined: 03 Jul 2003
Posts: 428
Location: Oslo, Norway

PostPosted: Tue Jul 13, 2004 12:06 pm    Post subject: Reply with quote

I just saw on another page that some versions of the b2commentspopup.php don't allow direct linking. Mine do. Yours may not. Which should explain why it didn't work.
_________________
Sigg3 dot net - because you're worth it! | b2 Cafelog Resource Center
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Template help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group