View previous topic :: View next topic |
Author |
Message |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Thu Jul 24, 2003 1:55 pm Post subject: |
|
|
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 |
|
 |
tiezeman
Joined: 23 Jul 2003 Posts: 10 Location: Groningen - The Netherlands
|
Posted: Thu Jul 24, 2003 2:11 pm Post subject: |
|
|
Hi Mike,
Thanks again, but it seems not to work
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
Do you have any idea?
Thanks in advance!
T |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Thu Jul 24, 2003 3:38 pm Post subject: |
|
|
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 |
|
 |
tiezeman
Joined: 23 Jul 2003 Posts: 10 Location: Groningen - The Netherlands
|
Posted: Thu Jul 24, 2003 3:41 pm Post subject: |
|
|
That's it
Thanks Mike, you're the greatest!
T. |
|
Back to top |
|
 |
Katiemarie
Joined: 17 Nov 2002 Posts: 2
|
Posted: Sun Jul 27, 2003 10:03 pm Post subject: |
|
|
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 |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Mon Jul 28, 2003 7:21 am Post subject: |
|
|
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 |
|
 |
Armitage
Joined: 28 Dec 2002 Posts: 14
|
Posted: Wed Sep 17, 2003 12:06 am Post subject: |
|
|
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 |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Wed Sep 17, 2003 1:14 am Post subject: |
|
|
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 |
|
 |
|