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, 4, 5, 6 ... 9, 10, 11  Next
 
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: Sun Jan 05, 2003 11:27 pm    Post subject: Reply with quote

Loyd,
Thanks very much for finding and fixing this. I'll incorporate it into the next release.

I guess I didn't test that part properly.

I'm glad you like 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
lg



Joined: 05 Jan 2003
Posts: 8
Location: Oxford, MS, USA

PostPosted: Mon Jan 06, 2003 12:03 am    Post subject: All links page Reply with quote

One of the reasons I installed Links Manager was to store all my links in one place. However, I wanted a main "links" page to show all links by category.

This page uses the css styles in b2's index.php/layout2b.css.

As shown, this page shows all links in all categories, ordered by category name, then link name. Descriptions and images are shown, if available.

links.php
[php:1:b405e4cd1e]<?php
$blog=1;
include("./blog.header.php");
include_once("./b2links.php");
$query = "select cat_id, cat_name from $tablelinkcategories order by 2";
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-control" content="no-cache" />
<title><?php bloginfo('name') ?> :: Links</title>
<link rel="stylesheet" type="text/css" href="/layout2b.css" />
</head>
<body>

<div id="header"><a href="" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?> :: Links</a></div>

<table align="center" columns="1" width="600"><tr><td>

<?php
/* motor for link categories, then show all links therein */
$result = mysql_query($query) or die("Could not retrieve list of link categories.");
while ($row = mysql_fetch_array($result)) {
?>

<h2><?php echo $row['cat_name']; ?></h2>
<p class="storyContent"><?php get_links($row['cat_id'],'','<br />',' ',true,'name',true,false); ?></p>

<?php
}
?>

</td></tr></table>

<p><a href="/">Return home</a></p>

</body>
</html>[/php:1:b405e4cd1e]
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 Jan 06, 2003 12:39 am    Post subject: Reply with quote

Excellent! I like that use.

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
fullo



Joined: 06 Jan 2003
Posts: 2
Location: Italy

PostPosted: Mon Jan 06, 2003 5:38 pm    Post subject: Reply with quote

Hi,
I've used the previous links.php idea to create a popup windows (like for the comments) with the list of all links.

This is the new code that I've put in the b2links.php file

Code:

/** function links_popup_script()
 ** Show the link to the links popup and the number of links
 ** Parameters:   
 **            text (default Links)  - the text of the link
 **            width (default 400)  - the width of the popup window
 **            height (default 400)  - the height of the popup window
 **            file (default b2linkspopup.php) - the page to open in the popup window
 **            count (default true) - the number of links in the db
 */
function links_popup_script($text = 'Links', $width=400, $height=400, $file='b2linkspopup.php', $count = true) {
   global $tablelinks;
   if ($count == true) {
      $sql = "SELECT count(*) FROM $tablelinks WHERE 1";
      $result = mysql_query($sql) or die("Couldn't query the db for categories:".mysql_error());
      
      if ($row = mysql_fetch_row($result)) {
         $counts = $row[0];
      }
   }
   
   $javascript = "<a href=\"#\" onclick=\"javascript:window.open('$file', '_blank', 'width=$width,height=$height,scrollbars=yes,status=no'); return false\">";
   $javascript .= $text;

   if ($count == true) {
      $javascript .= " ($counts)";
   }

   $javascript .="</a>\n\n";
   echo $javascript;
}


then from the template file I need only to call the function links_popup_script to show the link to the popup

Code:

<?php links_popup_script(); ?>


for a demo look at my signature
I hope you'll like this :D

ciuaz fullo
_________________
Full(o)Blog - http://fullo.no-ip.org
Nulla è impossibile per chi non lo deve fare
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Mon Jan 06, 2003 11:13 pm    Post subject: Reply with quote

Hi fullo,
that's another great idea.

Thanks for the feedback.

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
lg



Joined: 05 Jan 2003
Posts: 8
Location: Oxford, MS, USA

PostPosted: Wed Jan 08, 2003 12:48 am    Post subject: Added limit by functionality Reply with quote

I modified all the "get_links" functions in b2links.php to accept an additional parameter $limitto. If passed, it will limit the query to X results. Is the same as select * from blah limit 5, where 5 is changeable. If $limitto is not passed, all records are returned (ie, the normal functionality expected).

I don't use all of the functions here, someone tell me if something broke.

NOTE: If you specify 0 (for LIMIT 0), no records will be returned. This is accepted MySQL behavior.

[php:1:5dce903e0b]<?php
// $Id: b2links.php,v 1.9 2002/12/29 17:54:17 zed1 Exp $
//
// B2 Link Manager
// Copyright (C) 2002 Mike Little -- [email protected]
//
// This is an add-on to b2 weblog / news publishing tool
// b2 is copyright (c)2001, 2002 by Michel Valdrighi - [email protected]
//
// **********************************************************************
// Copyright (C) 2002 Mike Little
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Mike Little ([email protected])
// *****************************************************************

include_once('b2links.config.php');

/** function get_linksbyname()
** Gets the links associated with category 'cat_name'.
** Parameters: cat_name (default 'noname') - The category name to use. If no
** match is found uses all
** before (default '') - the html to output before the link
** after (default '<br />') - the html to output after the link
** between (default ' ') - the html to output between the link/image
** and it's description. Not used if no image or show_images == true
** show_images (default true) - whether to show images (if defined).
** orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
** 'url', 'description' or 'rating'. Or maybe owner. If you start the
** name with an underscore the order will be reversed.
** show_description (default true) - whether to show the description if
** show_images=false/not defined
** show_rating (default false) - show rating stars/chars
** limit (default -1) - Limit to X entries. If not specified, all entries
** are shown.
*/
function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $show_rating = false, $limitto = -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.".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, $limitto);
}


/** function get_links()
** Gets the links associated with category n.
** Parameters: category (default -1) - The category to use. If no category supplied
** uses all
** before (default '') - the html to output before the link
** after (default '<br />') - the html to output after the link
** between (default ' ') - the html to output between the link/image
** and it's description. Not used if no image or show_images == true
** show_images (default true) - whether to show images (if defined).
** orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
** 'url', 'description', or 'rating'. Or maybe owner. If you start the
** name with an underscore the order will be reversed.
** show_description (default true) - whether to show the description if
** show_images=false/not defined .
** show_rating (default false) - show rating stars/chars
** limit (default -1) - Limit to X entries. If not specified, all entries
** are shown.
*/
function get_links($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $show_rating = false, $limitto = -1) {
global $tablelinks, $b2links_rating_type, $b2links_rating_char,
$b2links_rating_image, $b2links_rating_ignore_zero,
$b2links_rating_single_image;

$direction = ' ASC';
$category_query = "";
if ($category != -1) {
$category_query = " AND link_category = $category ";
}
dbconnect();
$query = "SELECT link_url, link_name, link_image, link_target, link_description, link_rating "
. " FROM $tablelinks "
. " WHERE link_visible = 'Y' "
. $category_query;
if ($orderby == '')
$orderby = 'id';
if (substr($orderby,0,1) == '_') {
$direction = ' DESC';
$orderby = substr($orderby,1);
}
$query .= " ORDER BY link_".$orderby;
$query .= $direction;
/* The next 2 lines implement LIMIT TO processing */
if ($limitto != -1)
$query .= " limit $limitto";

$result = mysql_query($query) or die("Couldn't execute query. ".mysql_error());
while ($row = mysql_fetch_object($result)) {
echo($before);
$the_link = '#';
if (($row->link_url != null) || ($row->link_url != '')) {
$the_link = $row->link_url;
}
echo("<a href=\"".$the_link."\" title=\"" . stripslashes($row->link_description) . "\" target=\"$row->link_target\">");
if (($row->link_image != null) && $show_images) {
echo("<img src=\"$row->link_image\" border=\"0\" alt=\"" . stripslashes($row->link_name) . "\" title=\"" . stripslashes($row->link_description) . "\" />");
} else {
echo(stripslashes($row->link_name));
}
if ((($row->link_image != null) && $show_images) || !$show_description) {
echo("</a>");
} else {
echo("</a>$between" . stripslashes($row->link_description));
}

// now do the rating
if ($show_rating) {
echo($between);
if ($b2links_rating_type == 'number') {
if (($row->link_rating != 0) || ($b2links_rating_ignore_zero != 1)) {
echo(" $row->link_rating\n");
}
} else if ($b2links_rating_type == 'char') {
for ($r = $row->link_rating; $r > 0; $r--) {
echo($b2links_rating_char);
}
} else if ($b2links_rating_type == 'image') {
if ($b2links_rating_single_image) {
for ($r = $row->link_rating; $r > 0; $r--) {
echo(' <img src="'.$b2links_rating_image[0].'" alt="'.$row->link_rating.'" />'."\n");
}
} else {
if (($row->link_rating != 0) || ($b2links_rating_ignore_zero != 1)) {
echo(' <img src="'.$b2links_rating_image[$row->link_rating].'" alt="'.$row->link_rating.'" />'."\n");
}
}
} // end if image
} // end if show_rating
echo("$after\n");
} // end while
}

/** function get_linksbyname_withrating()
** Gets the links associated with category 'cat_name' and display rating stars/chars.
** Parameters: cat_name (default 'noname') - The category name to use. If no
** match is found uses all
** before (default '') - the html to output before the link
** after (default '<br />') - the html to output after the link
** between (default ' ') - the html to output between the link/image
** and it's description. Not used if no image or show_images == true
** show_images (default true) - whether to show images (if defined).
** orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
** 'url' or 'description'. Or maybe owner. If you start the
** name with an underscore the order will be reversed.
** show_description (default true) - whether to show the description if
** show_images=false/not defined
** limit (default -1) - Limit to X entries. If not specified, all entries
** are shown.
*/
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $limitto = -1) {
get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limitto);
}

/** function get_links_withrating()
** Gets the links associated with category n and display rating stars/chars.
** Parameters: category (default -1) - The category to use. If no category supplied
** uses all
** before (default '') - the html to output before the link
** after (default '<br />') - the html to output after the link
** between (default ' ') - the html to output between the link/image
** and it's description. Not used if no image or show_images == true
** show_images (default true) - whether to show images (if defined).
** orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
** 'url' or 'description'. Or maybe owner. If you start the
** name with an underscore the order will be reversed.
** show_description (default true) - whether to show the description if
** show_images=false/not defined .
** limit (default -1) - Limit to X entries. If not specified, all entries
** are shown.
*/
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $limitto = -1) {
get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, true, $limitto);
}

/** function get_linkcatname()
** Gets the name of category n.
** Parameters: id (default 0) - The category to get. If no category supplied
** uses 0
*/
function get_linkcatname($id = 0) {
global $tablelinkcategories;
$cat_name = "noname";
$sql = "SELECT cat_name FROM $tablelinkcategories WHERE cat_id=$id";
$result = mysql_query($sql) or die("Couldn't query the db for categories:".mysql_error());
if ($row = mysql_fetch_object($result)) {
$cat_name = stripslashes($row->cat_name);
}
return $cat_name;
}

/** function get_get_autotoggle()
** Gets the auto_toggle setting of category n.
** Parameters: id (default 0) - The category to get. If no category supplied
** uses 0
*/
function get_autotoggle($id = 0) {
global $tablelinkcategories;
$auto_toggle = "N";
$sql = "SELECT auto_toggle FROM $tablelinkcategories WHERE cat_id=$id";
$result = mysql_query($sql) or die("Couldn't query the db for categories:".mysql_error());
if ($row = mysql_fetch_object($result)) {
$auto_toggle = $row->auto_toggle;
}
return $auto_toggle;
}

?>[/php:1:5dce903e0b]

Hope this is of use.
Loyd
_________________
Loyd Goodbar
http://www.blackrobes.net/
Back to top
View user's profile Send private message Visit poster's website
fullo



Joined: 06 Jan 2003
Posts: 2
Location: Italy

PostPosted: Wed Jan 08, 2003 2:05 pm    Post subject: Re: Added limit by functionality Reply with quote

I've hacked your hack!

now you can choose if you want to display random links from the db
simply adding the $random = true in the last parameter (false is default)

it is usefull only with the $limit != -1 because it's only an order type and note that it overwrite the $orderby parameter!

[php:1:7e31f2be11]
<?php
/** function get_links()
** Gets the links associated with category n.
** Parameters: category (default -1) - The category to use. If no category supplied
** uses all
** before (default '') - the html to output before the link
** after (default '<br />') - the html to output after the link
** between (default ' ') - the html to output between the link/image
** and it's description. Not used if no image or show_images == true
** show_images (default true) - whether to show images (if defined).
** orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
** 'url', 'description', or 'rating'. Or maybe owner. If you start the
** name with an underscore the order will be reversed.
** show_description (default true) - whether to show the description if
** show_images=false/not defined .
** show_rating (default false) - show rating stars/chars
** limit (default -1) - Limit to X entries. If not specified, all entries
** are shown.
** random (default false) - show random entries instead the last X
** are shown.

*/
function get_links($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $show_rating = false, $limitto = -1, $random = false) {
global $tablelinks, $b2links_rating_type, $b2links_rating_char,
$b2links_rating_image, $b2links_rating_ignore_zero,
$b2links_rating_single_image;

$direction = ' ASC';
$category_query = "";
if ($category != -1) {
$category_query = " AND link_category = $category ";
}
dbconnect();
$query = "SELECT link_url, link_name, link_image, link_target, link_description, link_rating "
. " FROM $tablelinks "
. " WHERE link_visible = 'Y' "
. $category_query;

// random hack order
if (($random == true) && ($limit != -1)) {
$query .= " ORDER BY RAND()";
} else {
if ($orderby == '')
$orderby = 'id';
if (substr($orderby,0,1) == '_') {
$direction = ' DESC';
$orderby = substr($orderby,1);
}
$query .= " ORDER BY link_".$orderby;
}
$query .= $direction;
/* The next 2 lines implement LIMIT TO processing */
if ($limitto != -1)
$query .= " limit $limitto";

$result = mysql_query($query) or die("Couldn't execute query. ".mysql_error());
while ($row = mysql_fetch_object($result)) {
echo($before);
$the_link = '#';
if (($row->link_url != null) || ($row->link_url != '')) {
$the_link = $row->link_url;
}
echo("<a href=\"".$the_link."\" title=\"" . stripslashes($row->link_description) . "\" target=\"$row->link_target\">");
if (($row->link_image != null) && $show_images) {
echo("<img src=\"$row->link_image\" border=\"0\" alt=\"" . stripslashes($row->link_name) . "\" title=\"" . stripslashes($row->link_description) . "\" />");
} else {
echo(stripslashes($row->link_name));
}
if ((($row->link_image != null) && $show_images) || !$show_description) {
echo("</a>");
} else {
echo("</a>$between" . stripslashes($row->link_description));
}

// now do the rating
if ($show_rating) {
echo($between);
if ($b2links_rating_type == 'number') {
if (($row->link_rating != 0) || ($b2links_rating_ignore_zero != 1)) {
echo(" $row->link_rating\n");
}
} else if ($b2links_rating_type == 'char') {
for ($r = $row->link_rating; $r > 0; $r--) {
echo($b2links_rating_char);
}
} else if ($b2links_rating_type == 'image') {
if ($b2links_rating_single_image) {
for ($r = $row->link_rating; $r > 0; $r--) {
echo(' <img src="'.$b2links_rating_image[0].'" alt="'.$row->link_rating.'" />'."\n");
}
} else {
if (($row->link_rating != 0) || ($b2links_rating_ignore_zero != 1)) {
echo(' <img src="'.$b2links_rating_image[$row->link_rating].'" alt="'.$row->link_rating.'" />'."\n");
}
}
} // end if image
} // end if show_rating
echo("$after\n");
} // end while
}

?>
[/php:1:7e31f2be11]
_________________
Full(o)Blog - http://fullo.no-ip.org
Nulla è impossibile per chi non lo deve fare
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
lg



Joined: 05 Jan 2003
Posts: 8
Location: Oxford, MS, USA

PostPosted: Wed Jan 08, 2003 4:15 pm    Post subject: Re: Added limit by functionality Reply with quote

You need to change $limit to $limitto in get_links().

You can get the same effect with the current code by saying

[php:1:939d5471cd]<?php get_links(-1,'','','',true,'rand',true,true,-1); ?>[/php:1:939d5471cd]

and use the get_links() function below. It implements both the limit to processing above and random sequence.


[php:1:939d5471cd]<?php
/** function get_links()
** Gets the links associated with category n.
** Parameters: category (default -1) - The category to use. If no category supplied
** uses all
** before (default '') - the html to output before the link
** after (default '<br />') - the html to output after the link
** between (default ' ') - the html to output between the link/image
** and it's description. Not used if no image or show_images == true
** show_images (default true) - whether to show images (if defined).
** orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
** 'url', 'description', or 'rating'. Random 'rand' is also supported.
** Or maybe owner. If you start the name with an underscore the
** order will be reversed.
** show_description (default true) - whether to show the description if
** show_images=false/not defined .
** show_rating (default false) - show rating stars/chars
** limit (default -1) - Limit to X entries. If not specified, all entries
** are shown.
*/
function get_links($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', $show_description = true, $show_rating = false, $limitto = -1) {
global $tablelinks, $b2links_rating_type, $b2links_rating_char,
$b2links_rating_image, $b2links_rating_ignore_zero,
$b2links_rating_single_image;

$direction = ' ASC';
$category_query = "";
if ($category != -1) {
$category_query = " AND link_category = $category ";
}
dbconnect();
$query = "SELECT link_url, link_name, link_image, link_target, link_description, link_rating "
. " FROM $tablelinks "
. " WHERE link_visible = 'Y' "
. $category_query;
if ($orderby == '')
$orderby = 'id';
if (substr($orderby,0,1) == '_') {
$direction = ' DESC';
$orderby = substr($orderby,1);
}
// $query .= " ORDER BY link_".$orderby;
$query .= " order by";
$query .= preg_match("/rand/i",$orderby) == true ? " rand()" : " link_".$orderby;
$query .= $direction;
if ($limitto != -1)
$query .= " limit $limitto";

$result = mysql_query($query) or die("Couldn't execute query. ".mysql_error());
while ($row = mysql_fetch_object($result)) {
echo($before);
$the_link = '#';
if (($row->link_url != null) || ($row->link_url != '')) {
$the_link = $row->link_url;
}
echo("<a href=\"".$the_link."\" title=\"" . stripslashes($row->link_description) . "\" target=\"$row->link_target\">");
if (($row->link_image != null) && $show_images) {
echo("<img src=\"$row->link_image\" border=\"0\" alt=\"" . stripslashes($row->link_name) . "\" title=\"" . stripslashes($row->link_description) . "\" />");
} else {
echo(stripslashes($row->link_name));
}
if ((($row->link_image != null) && $show_images) || !$show_description) {
echo("</a>");
} else {
echo("</a>$between" . stripslashes($row->link_description));
}

// now do the rating
if ($show_rating) {
echo($between);
if ($b2links_rating_type == 'number') {
if (($row->link_rating != 0) || ($b2links_rating_ignore_zero != 1)) {
echo(" $row->link_rating\n");
}
} else if ($b2links_rating_type == 'char') {
for ($r = $row->link_rating; $r > 0; $r--) {
echo($b2links_rating_char);
}
} else if ($b2links_rating_type == 'image') {
if ($b2links_rating_single_image) {
for ($r = $row->link_rating; $r > 0; $r--) {
echo(' <img src="'.$b2links_rating_image[0].'" alt="'.$row->link_rating.'" />'."\n");
}
} else {
if (($row->link_rating != 0) || ($b2links_rating_ignore_zero != 1)) {
echo(' <img src="'.$b2links_rating_image[$row->link_rating].'" alt="'.$row->link_rating.'" />'."\n");
}
}
} // end if image
} // end if show_rating
echo("$after\n");
} // end while
}
?>[/php:1:939d5471cd]

This puts rand() in the order by, and the underscore for reverse sorting should still work. (Why reverse sort a random list?)
_________________
Loyd Goodbar
http://www.blackrobes.net/
Back to top
View user's profile Send private message Visit poster's website
Edlef



Joined: 16 Mar 2002
Posts: 71

PostPosted: Sat Jan 11, 2003 11:24 am    Post subject: Error? Reply with quote

Fantastic Script!!
Ive installed it, used the latest install.php, fixed it (like Loyd wrote) and have an error if i use the "Show links in category:" = All.
The error:
"Couldn't execute query.You have an error in your SQL syntax near 'ORDER BY link_id' at line 1"
If i use another category, everything seems fine.

Any hints??
THANKS!
Back to top
View user's profile Send private message Visit poster's website
lg



Joined: 05 Jan 2003
Posts: 8
Location: Oxford, MS, USA

PostPosted: Sat Jan 11, 2003 7:55 pm    Post subject: Re: Error? Reply with quote

Is this while you are logged in and using b2linkmanager.php page? I don't get an error there. Can you post your whole b2links.php file?

Edlef wrote:
Fantastic Script!!
Ive installed it, used the latest install.php, fixed it (like Loyd wrote) and have an error if i use the "Show links in category:" = All.
The error:
"Couldn't execute query.You have an error in your SQL syntax near 'ORDER BY link_id' at line 1"
If i use another category, everything seems fine.

Any hints??
THANKS!

_________________
Loyd Goodbar
http://www.blackrobes.net/
Back to top
View user's profile Send private message Visit poster's website
Edlef



Joined: 16 Mar 2002
Posts: 71

PostPosted: Sun Jan 12, 2003 9:34 am    Post subject: Sorry Reply with quote

Hi loyd,

I think it was my error. Ive installed b2linkmanager on another server today and everything is working fine. I will check the version on the other server...
Thanks for your support!!!
Back to top
View user's profile Send private message Visit poster's website
lg



Joined: 05 Jan 2003
Posts: 8
Location: Oxford, MS, USA

PostPosted: Sun Jan 12, 2003 10:26 pm    Post subject: Re: Sorry Reply with quote

Not a problem. Just wanted to make sure that you installed both the entire b2links.php file and the latest get_links() update. Both pieces give you limit-to processing and random sorting if you need it.

I'm grateful to mikelittle for providing b2linkmanager. I think I have a lot of links to manage on my website, and having a single interface is a godsend. With these little tweaks, b2linkmanager is virtually perfect for my needs.

Loyd

Edlef wrote:
Hi loyd,

I think it was my error. Ive installed b2linkmanager on another server today and everything is working fine. I will check the version on the other server...
Thanks for your support!!!

_________________
Loyd Goodbar
http://www.blackrobes.net/
Back to top
View user's profile Send private message Visit poster's website
Ook



Joined: 13 Jan 2003
Posts: 1
Location: Amsterdam, Netherlands

PostPosted: Mon Jan 13, 2003 3:39 pm    Post subject: Reply with quote

First of all, thanks to Mike for creating all this stuff; also thanks to lg for providing me with the info about how to get around the "Couldn't Add Category.." problem.

I also found a very tiny "bug" Smile
This part is missing in the b2linkcategories.php file:
Code:
$title = 'Link Categories'
It also affects the way the menu file shows which section your in at that time (that's how I noticed it).

Keep up the good work!
Back to top
View user's profile Send private message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Jan 15, 2003 2:37 am    Post subject: Reply with quote

Ook wrote:
I also found a very tiny "bug" Smile
This part is missing in the b2linkcategories.php file:
Code:
$title = 'Link Categories'
It also affects the way the menu file shows which section your in at that time (that's how I noticed it).

Keep up the good work!


Thanks Michiel, for your comments and spotting the ommission.

I lost that line in an overzealous edit during work for version 1. It's back now and will be in the next release.

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
activemx



Joined: 19 Jul 2002
Posts: 5

PostPosted: Fri Jan 17, 2003 9:36 pm    Post subject: Reply with quote

When i try to run the install file i get this error


Fatal error: Call to undefined function: add_filter() in public_html/news/b2-include/b2vars.php on line 273
_________________
Gwen Stefani Forever! - No Doubt Fan 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, 4, 5, 6 ... 9, 10, 11  Next
Page 5 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