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



Joined: 12 Oct 2002
Posts: 77

PostPosted: Thu May 01, 2003 4:53 pm    Post subject: Reply with quote

Hey thanks, that's nice to hear!

Ruud
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 May 05, 2003 1:30 pm    Post subject: Reply with quote

Oops I've let a bug slip through the last release I made.

If you are getting

Fatal error: Call to undefined function: get_linkcatname() in /usr/local/psa/home/vhosts/zanadoria.com/httpdocs/b2linkcategories.php on line 196 on the linkcategories page you need to add a line near the top of b2linkcategories.php

Code:

include_once('b2links.config.php');

$title = "Link Categories";


becomes
Code:

include_once('b2links.config.php');
include_once('b2links.php');

$title = "Link Categories";


I thought I'd already fixed that one!

I've updated the zip file and tarball.

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
donncha



Joined: 18 Feb 2003
Posts: 43
Location: Cork, Ireland

PostPosted: Mon May 05, 2003 8:06 pm    Post subject: blo.gs support Reply with quote

Mike - I'm probably going to add blo.gs or weblog.com support to b2links during the week. I already added a http://blo.gs favourites blogroll plugin to b2++, and the same idea can be used for b2Links.

More about blo.gs and b2++ here: http://tidakada.com/board/viewtopic.php?p=14241#14241

If you don't mind, I'll add b2links to b2++ as well, and have it distributed with the tarball.
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 May 05, 2003 8:19 pm    Post subject: Reply with quote

Hi Donncha,

I don't mind at all.

I look forward to 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
Sansnom



Joined: 31 Jan 2002
Posts: 94
Location: Paris

PostPosted: Fri May 09, 2003 7:22 pm    Post subject: Reply with quote

Heeeelpppppp !!!!

My blog use special caracters and since I have installed b2links (great hack for everything else) I have square instead of special caracters !!!

Does someone know how to fix this special problem ?!

You can see the bug at :

http://www.sansfin.com

on the right, at the rubrique "Annuaires".

ps : the bug expands itself ! Is it a virus ?? It has appeared when i have installed b2links ! Just at this moment...
_________________
http://www.sansfin.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Fri May 09, 2003 11:04 pm    Post subject: Reply with quote

Hi Sansnom,

First of all, stop panicking!

When I look at you blog in Mozilla, I don't see any square characters.
In you main posts I see accented characters, but in the links, I see question marks.

I tried to reporduce the problem by adding some accented characters to the text of a link in b2links. I used Windows Character Map to enter the characters, as I only have an English keyboard.
When I did that and saved the link, and then viewed my blog, I could see the accented characters ok.

How are you entering your accented characrters? I'm sure you are just using an ordinary (french) keyboard.

If you use the Character Map to enter accented characters does it have the same problem?



Mike

PS: I'm not sure what you mean by the bug expands itself but, no it is not a virus!
_________________
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
Sansnom



Joined: 31 Jan 2002
Posts: 94
Location: Paris

PostPosted: Fri May 09, 2003 11:49 pm    Post subject: Reply with quote

Hello Mike,

I'm writing special caracters with my keyboard. I don't know how to do another way.

There isn't any square inside b2loop, but there are a lot outside. In the pools too (!), witch are not b2links... so I was worried.

I tell you what I have done.

I have use the lg hack and I have create a links.php file (I give you my code with inclusion of CSS in code / It is perhaps the problem) :

links.php :

Code:
<?php
   $blog=1;
   include("./blog.header.php");
   include_once("./b2links.php");
   

   
   $query = "select cat_id, cat_name from $tablelinkcategories order by cat_id";
?>

<!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></title>
<link rel="stylesheet" href="sansfin.css" type="text/css">
</head>
<body>

<table columns="1" width="250" cellpadding="0" cellspacing="0" border="0">
  <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)) {
?>

<?php

echo "<br><span class=noirgras>";
echo $row['cat_name'];
echo "</span><br>";

?>
<br>
<?php get_links($row['cat_id'],'<span class="noirfin">- </span>','</span><br/>','<br><span class=grisclair>',true,'name',true,false); ?>

<?php
   }
?>

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

</body>
</html>


In b2links.php, I have only hack one fonction :

Code:
function get_links($category = -1, $before = '', $after = '',
                   $between = "", $show_images = true, $orderby = 'id',
                   $show_description = true, $show_rating = false,
                   $limit = -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();
    $sql = "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);
    }
    if (strcasecmp('rand',$orderby) == 0) {
        $orderby = 'rand()';
    } else {
        $orderby = " link_" . $orderby;
    }
    $sql .= ' ORDER BY ' . $orderby;
    $sql .= $direction;
    /* The next 2 lines implement LIMIT TO processing */
    if ($limit != -1)
        $sql .= " LIMIT $limit";

    $result = mysql_query($sql)
              or die("Couldn't execute query. " . $sql . 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\">");
         
         echo ("<span class=addition>");
         
        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("</span></a>");
        } else {
            echo("</span></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
}


I have made this because using the parameters doesn't work. When <span> is before <a href>, the css doesn't work in IE. So I have make something to have <a href=... ><span class=links>links</span></a>.

But in fact, I don't believe it's a css problem. I have tried to include b2vars.php to obtain a convertion of specials caracters, but I failed.

I think there is a problem of convertion of special caracters.
If you know what to do, I'm your obligé because me I'm exhausted to search and afraid by the ugly result of squares.

Thanks anyway for your response Smile
_________________
http://www.sansfin.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Sat May 10, 2003 12:20 am    Post subject: Reply with quote

Hi Sansnom ( == no name?)

Firstly, lg's hack to show all links in all categories is meant to be a standalone page. Not included as a part of another page.

By doing it this way, you have included a new html header in the middle of your page. You should not do this.
Secondly that html header specifies an charset of utf-8 which I think you should not have.

Please remove the html header and <body> tag to see if that fixes it. (and also the </body></html> at the end of that file).

Thirdly, I noticed that you have
<link rel="stylesheet" href="sansfin.css" type="text/css">
inside your b2 loop. You do not need to do this. You should only have that line once inside the head section at the top of your blog page. (which you have)


I 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
Sansnom



Joined: 31 Jan 2002
Posts: 94
Location: Paris

PostPosted: Sat May 10, 2003 12:28 am    Post subject: Reply with quote

You are ultime !!!

Thanks a lot !

Sansnom means no name because I'm the webmaster of Sansfin witch means no end. It's a story writing by a team.

My real name is Marc and I'm glad to know you. I send you by mail my personnal url.

Do you remember you have give me your archive script ? It's always running !

A+,

S.
_________________
http://www.sansfin.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Sat May 10, 2003 1:00 am    Post subject: Reply with quote

Hi,
I'm glad it got solved.
I do remember you using my fullarchives script yes!

Always glad to help,
Thanks,
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: Sun May 18, 2003 3:11 pm    Post subject: Reply with quote

Hey;

I have a frame redirect script that I would like to use with b2links. All I have to do is put a string before the http:// -- where is the place for me to add this?

I posted this here, Mike, because I thought it may be useful to some others... i dunno?
_________________
Check this out! The ULTIMATE site!
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 May 26, 2003 10:54 pm    Post subject: JavaScript Problem with Opera Reply with quote

I've had another bug reported.
There is a javascript problem with opera.
In the file b2linkmanager.php around line 452 you need to change

Code:

      echo("  <td><input type=\"submit\" name=\"edit\" onclick=\"forms['links'].link_id.value='$row->link_id'; forms['links'].action.value='linkedit'; \" value=\"Edit\" class=\"search\" /></td>\n");
      echo("  <td><input type=\"submit\" name=\"delete\" onclick=\"forms['links'].link_id.value='$row->link_id'; forms['links'].action.value='Delete'; return confirm('You are about to delete this link.\\n  \'Cancel\' to stop, \'OK\' to delete.'); \" value=\"Delete\" class=\"search\" /></td>\n");



to read

Code:

      echo("  <td><input type=\"submit\" name=\"edit\" onclick=\"document.forms['links'].link_id.value='$row->link_id'; document.forms['links'].action.value='linkedit'; \" value=\"Edit\" class=\"search\" /></td>\n");
      echo("  <td><input type=\"submit\" name=\"delete\" onclick=\"document.forms['links'].link_id.value='$row->link_id'; document.forms['links'].action.value='Delete'; return confirm('You are about to delete this link.\\n  \'Cancel\' to stop, \'OK\' to delete.'); \" value=\"Delete\" class=\"search\" /></td>\n");



That is, references to forms['links'] have been replaced with document.forms['links']

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
flickerfly



Joined: 06 May 2003
Posts: 49

PostPosted: Tue May 27, 2003 2:43 am    Post subject: Re: JavaScript Problem with Opera Reply with quote

mikelittle wrote:
I've had another bug reported.
There is a javascript problem with opera.
In the file b2linkmanager.php around line 452 you need to change...


I'm not at my home PC at the moment, but I'll test it later. Thanks for getting on top of that so quickly. I wouldn't be surprised to find the newer version doesn't haggle over this, but I use an older on 6.2 I think because of OperaMail. Thanks again.
Back to top
View user's profile Send private message Visit poster's website
allusion



Joined: 16 Jun 2002
Posts: 73
Location: Houston

PostPosted: Tue May 27, 2003 4:43 am    Post subject: Reply with quote

Just a note that the latest version is included with WordPress, which Mike is a developer of.
_________________
Matthew Mullenweg
Wordpress
Back to top
View user's profile Send private message Visit poster's website AIM Address
flickerfly



Joined: 06 May 2003
Posts: 49

PostPosted: Wed May 28, 2003 3:32 am    Post subject: Reply with quote

Just a report that Mike's fix works for Opera 6.2 Thanks Mike for your quick response on that. Worked great.
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 ... 8, 9, 10, 11  Next
Page 9 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