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 

B2Links - A Link Manager for B2
Goto page Previous  1, 2, 3 ... 9, 10, 11
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Thu Jul 24, 2003 1:55 pm    Post subject: Reply with quote

Hi,
OK, I see now.

What you will need to do is add the line
Code:

  $current_cat = $post->post_category;

inside the main loop, where it can save away the category id of the post.

Then below your links heading you can use
Code:

get_links($current_cat);


I think that should do it.

Mike
_________________
Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't."
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
tiezeman



Joined: 23 Jul 2003
Posts: 10
Location: Groningen - The Netherlands

PostPosted: Thu Jul 24, 2003 2:11 pm    Post subject: Reply with quote

Hi Mike,

Thanks again, but it seems not to work Sad

The following error occurs:

Code:
Couldn't execute query. SELECT link_url, link_name, link_image, link_target, link_description, link_rating FROM b2links WHERE link_visible = 'Y' AND link_category = ORDER BY link_id ASCYou have an error in your SQL syntax near 'ORDER BY link_id ASC' at line 1


It works okay when I replace
Code:
get_links($current_cat);

for
Code:
get_links(1);


Do you have any idea?
Thanks in advance!

T
Back to top
View user's profile Send private message MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Thu Jul 24, 2003 3:38 pm    Post subject: Reply with quote

Hmmm...
Try
Code:

$current_cat = $postdata['Category'];

inside the b2 loop

Mike
_________________
Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't."
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
tiezeman



Joined: 23 Jul 2003
Posts: 10
Location: Groningen - The Netherlands

PostPosted: Thu Jul 24, 2003 3:41 pm    Post subject: Reply with quote

That's it Very Happy

Thanks Mike, you're the greatest!

T.
Back to top
View user's profile Send private message MSN Messenger
Katiemarie



Joined: 17 Nov 2002
Posts: 2

PostPosted: Sun Jul 27, 2003 10:03 pm    Post subject: Reply with quote

I checked the whole thread for something about this problem, but I didn't see it.

I'm trying to install b2links on a site I'm doing for a friend. I've already installed it on one site without a problem, but on this site, I keep getting the following error message..

Fatal error: Call to undefined function: dbconnect() in /home/merluvc/public_html/sideburnz/b2/b2links.php on line 106


Did I just miss a tag somewhere or something?
Back to top
View user's profile Send private message Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Mon Jul 28, 2003 7:21 am    Post subject: Reply with quote

Hi Katiemarie

You need to make sure you include b2functions.php before you include b2links.php

Mike
_________________
Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't."
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Armitage



Joined: 28 Dec 2002
Posts: 14

PostPosted: Wed Sep 17, 2003 12:06 am    Post subject: Reply with quote

Is there a way to control text after a link/image? Like on my site ( http://flatplanet.ws/ ) the two images in the links box are really close together. I tried adding BR tags in the link manager but it didn't work. Other then inserting a spacer after every link is there a way to control this?

Something like get_links(1,<br><br>); would be handy.

Also... anyone else have problems getting this hack to work in Opera (editing/deleteing links)?[/code]
Back to top
View user's profile Send private message Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Sep 17, 2003 1:14 am    Post subject: Reply with quote

Hi Armitage,
There are a whole bunch of optional paramters to the call to get_links().
If you look in the file b2links.php you can see the documentation for each function.
The first four parameters are category, before text, after text and between text (between link and description)

So you could do
get_links(1, '<p>', '</p>', '<br>')
for example.

For the opera problem, see this link http://tidakada.com/board/viewtopic.php?p=15085#15085

Hope this helps,

Mike
_________________
Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't."
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page Previous  1, 2, 3 ... 9, 10, 11
Page 11 of 11

 
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