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 ... 7, 8, 9, 10, 11  Next
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
kichu



Joined: 23 Feb 2002
Posts: 53
Location: Chennai,India

PostPosted: Sat Mar 08, 2003 3:44 am    Post subject: Reply with quote

mikelittle wrote:
Hi,
If the other occurance was in the function get_linksbyname() then as long as you changed the three in that function you should be ok.

Mike

Thanks.
1. I have restored "$cat_id" at that occurence - that is, function get_linksbyname().
2. Please elucidate what exactly you meant by "changed the three"
Thanks
S.K
_________________
Cause something to change, you are not here for ever!
Back to top
View user's profile Send private message Visit poster's website
kichu



Joined: 23 Feb 2002
Posts: 53
Location: Chennai,India

PostPosted: Sat Mar 08, 2003 4:57 am    Post subject: Reply with quote

kichu wrote:

But I am able to add or delete links. No problem. But the code appears there.

Correction.
The new links that are added do not appear on the blog's page.
Help!
S.K
_________________
Cause something to change, you are not here for ever!
Back to top
View user's profile Send private message Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Sat Mar 08, 2003 1:47 pm    Post subject: Reply with quote

kichu wrote:
I get the following code rendered as it is (as code) when I click on link manager on the b2edit.php page - along with other things.
Quote:
SELECT link_url, link_name, link_image, link_description, link_visible, link_category AS cat_id, cat_name AS category, b2users.user_login, link_id, link_rating FROM b2links LEFT JOIN b2linkcategories ON b2links.link_category = b2linkcategories.cat_id LEFT JOIN b2users on b2users.ID = b2links.link_owner WHERE (b2users.user_level <= 10 OR b2users.ID = 1) ORDER BY link_id

But I am able to add or delete links. No problem. But the code appears there.
Kindly tell me how to fix it.
Thanks
S.K

That sounds like you have an 'echo $sql' or 'echo $query' soemwhere in the file. Perhaps it was an earlier debugging attempt?
Check around lines 412 - 431 in b2linkmanager.php

If it is there comment it out..

Mike


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
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Sat Mar 08, 2003 2:25 pm    Post subject: Reply with quote

kichu wrote:
mikelittle wrote:
Hi,
If the other occurance was in the function get_linksbyname() then as long as you changed the three in that function you should be ok.

Mike

Thanks.
1. I have restored "$cat_id" at that occurence - that is, function get_linksbyname().
2. Please elucidate what exactly you meant by "changed the three"
Thanks
S.K


Hi Kichu, in the function get_linksbyname() there are three occurences of $cat_id
Quote:

function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />',
$between = " ", $show_images = true, $orderby = 'id',
$show_description = true, $show_rating = false,
$limit = -1) {
global $tablelinkcategories;
$cat_id = -1;
$sql = "SELECT cat_id FROM $tablelinkcategories WHERE cat_name='$cat_name'";
$result = mysql_query($sql)
or die("Oops, couldn't query the db for categories."
. $sql . mysql_error());
if ($row = mysql_fetch_object($result)) {
$cat_id = $row->cat_id;
}
get_links($cat_id, $before, $after, $between, $show_images, $orderby,
$show_description, $show_rating, $limit);
}


Those were the three I meant.

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
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Sat Mar 08, 2003 2:28 pm    Post subject: Reply with quote

kichu wrote:
kichu wrote:

But I am able to add or delete links. No problem. But the code appears there.

Correction.
The new links that are added do not appear on the blog's page.

Help!
S.K


Kichu,
Are he new links you are adding in the same category as the ones which do appear?

In your template if you use get_links() you will get all links in all the categories displayed. If you use get_links(1), you will only get category 1 links displayed.

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
kichu



Joined: 23 Feb 2002
Posts: 53
Location: Chennai,India

PostPosted: Sat Mar 08, 2003 6:34 pm    Post subject: Reply with quote

Thanks, Mike.
Itz very kind of you.
Now on to try the other one ! :-)
Cheers!
S.K
_________________
Cause something to change, you are not here for ever!
Back to top
View user's profile Send private message Visit poster's website
Snowman



Joined: 18 Mar 2003
Posts: 6

PostPosted: Tue Mar 18, 2003 11:55 am    Post subject: Reply with quote

Hi im wondering if someone can helpme.

Ive installed the links mod and its working to a certain point.

The site has 3 categories and i have set up 3 links categories to match.

The problem is that i cant for the life of me figure out how to display links based on the category im in.

In my index.php file i have

Code:
<?php include_once("b2links.php");
get_links(); ?>


this displays the links down the left side of my site, however i cant figure out how to display only the links for the category im in.

for example if im am in index.php?cat=1 all links display, if i go to index.php?cat=2 all links still display all though i actually only want cat 2 links to display.

what do i need to do to change this.

any help would be most appreciated as this one has me totally stumped.
Back to top
View user's profile Send private message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Mar 18, 2003 12:30 pm    Post subject: Reply with quote

Hi Snowman,

I'm presuming your link categories match our post categories here.
I think you need to do something like

Code:

<?php include_once("b2links.php");
if ((empty($cat)) || ($cat == 'all') || ($cat == '0')) {
    get_links();
} else {
    get_links($cat);
}
?>


I think that should do it.
I'm not sure this would handle the case when you have for example, multiple cats (other than all) displayed.

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
Snowman



Joined: 18 Mar 2003
Posts: 6

PostPosted: Tue Mar 18, 2003 1:31 pm    Post subject: Reply with quote

Thanks for that it worked a charm Smile

now all i need is a way to reverse the display of the links so that the newest link displays first....

vut thats an easy edit i would think
Back to top
View user's profile Send private message
Snowman



Joined: 18 Mar 2003
Posts: 6

PostPosted: Tue Mar 18, 2003 1:38 pm    Post subject: Reply with quote

One other question i do have, which is probably more a general b2 question is how can i force a refresh of the sites pages.

Whenever someone comes to the site if they have been there recently and they have the site in their cache or their proxy server cache's they see the old page not an updated one.

Is there a simple way to ensure the page is refreshed?
Back to top
View user's profile Send private message
Graam



Joined: 20 Dec 2002
Posts: 134

PostPosted: Thu Apr 17, 2003 2:39 pm    Post subject: Reply with quote

http://tidakada.com/board/viewtopic.php?t=2563

Thanks so much for this hack. I can be lazy with all of my site now! No more manual updating for any of it anymore...
_________________
tin-men
powered by
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 Apr 30, 2003 12:32 am    Post subject: New Name - New Version Reply with quote

Folks,
I've issued version 1.2 of B2Links - the link manager for B2.
Changes are:
New Name (See this post)
and all the bug fixes which have been posted in this forum.

Sorry no new functionality yet, I just needed to get the name change released.

You can download it from the B2Links home page.

By the way, if any of you have links to my page with the name "B2 Link Manager",
please could you change it to read "B2Links". Thankyou.


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
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Thu May 01, 2003 2:22 pm    Post subject: Reply with quote

Woah, nearly got sued there, eh?

No new functionality?!? Awww... well, thats OK, I know you're a busy man.

If I could suggest some new functionality though...

* A links count (and category count).
* A way of putting somthing before specific category links (a paramater would be used I assume?)
* A 'submit links' form, the information would be sent to the b2 link manager for review -- then the admin can decided whether he wants to display the link or not, using a simple button.
* A link tracker which tracks how many times links have been clicked... the information could be displayed in the manager. The addition in turn could be used to create a 'whats cool' script for the links, displaying the top X clicked on links.

These are just some ideas I thought up. I really like the link-tracker one though, it would be nice to see how people browse my links section.
_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
Ruud



Joined: 12 Oct 2002
Posts: 77

PostPosted: Thu May 01, 2003 2:54 pm    Post subject: Reply with quote

Download and references updated.

I've left it as is but in your readme, menutop and screenshots there are still references to Link Manager.

Ruud

Info & Download for this hack.


Last edited by Ruud on Thu May 01, 2003 4:52 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
blog17



Joined: 28 Jan 2003
Posts: 144
Location: London, UK

PostPosted: Thu May 01, 2003 3:09 pm    Post subject: Reply with quote

Ruud -- Your website is so excellent, it is going to help me alot in my next design. Thank you so much.
_________________
Check this out! The ULTIMATE site!
Back to top
View user's profile Send private message Visit poster's website
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 ... 7, 8, 9, 10, 11  Next
Page 8 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