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 

Auto convert your friend's names into links
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
silverfire



Joined: 28 Feb 2003
Posts: 11

PostPosted: Thu Jul 31, 2003 8:43 pm    Post subject: Frustrations Reply with quote

Well, I decided I'd give this a try, as it's something I could use. I'm having nothing but problems in getting it to work. I put all the code in the right files, loaded up my blog page and got errors all over the place.

I tried tracking down any typos or errors that I might have introduced, but found nothing. I copy/pasted all the code. Being unable to figure out what went wrong (and how to fix it), I took the code out.

I still have errors all over the place, even though b2functions.php, b2vars.php, and b2template.functions.php are all back in their original state. And the line numbers cited by the error messages have nothing to do with anything I added; they're nothing I've touched.

Anyway, if you would check out http://www.firegold.net/news/ and see what you can make of the errors, I'd appreciate it. Thanks.
_________________
Silver Journey - my blog
Back to top
View user's profile Send private message
Candle



Joined: 23 Dec 2002
Posts: 547

PostPosted: Thu Jul 31, 2003 10:54 pm    Post subject: ......... Reply with quote

If you work with the files you have in your folder on your hard drive go grab a new zip and upload all the files you worked on in the server .
It should be ok then . just don't use any you have worked on .
_________________
My Game Forum
Back to top
View user's profile Send private message
silverfire



Joined: 28 Feb 2003
Posts: 11

PostPosted: Fri Aug 01, 2003 12:26 am    Post subject: Thanks Reply with quote

It's back up and working now. I'd still like to get this hack (or one like it) working, though. Trouble is, since I don't know why it broke my blog, I don't know how to make it work, lol.
_________________
Silver Journey - my blog
Back to top
View user's profile Send private message
XianghuaALPHA



Joined: 05 Aug 2003
Posts: 79
Location: Tulsa, OK

PostPosted: Wed Aug 20, 2003 7:43 pm    Post subject: a solution? Reply with quote

So I was thinking.

A - does the [friend] thing work that great? I was thinking about _friend that way it would HAVE to go back and find a name with a "_" in front of it - a odd and not so common - at least in my blogging habits - way of writing - thus taking care of it's over-zealous tendancies? A thought - I'll let someone smart figure it out though and or tell me if I'ma fool heh.

A.1 - Is this retroactive? So that anytime a older post is viewed it is shown as "Friend [with link]" vs the original "Friend" - or does it only do this as a at the time of generation thing?

B - Gadget Girl's site's been down for a while Sad

C - Could some kind soul - please PLEASE PLEASE - take all the Mr. V revisions and then kenko's addition and so forth - and please put it into a final version similar to the first post's? While I'm no fool and ask you to edit my files - I would appreciate the whole "Okay now THIS is what it is to look like currently" blah blah blah.

Perhaps even a Admin/Mod be the one to do this and just edit it into the first post / at the end of it?


It's a great hack and has several people I know excited about it - but before I go trying to edit and so forth - I'd like to have a 'this goes in this page and NOW looks like this' so on and so forth guide - thanks for the assistance and help!



X A
_________________
[ [ - - There can be only 2 or 3 - - ]]

You know what. On a quite board - you end up talking to yourself alot....


Friends don't let friends play Tekken™
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
ludvig87



Joined: 08 Aug 2003
Posts: 54
Location: Denmark

PostPosted: Sat Oct 04, 2003 1:17 pm    Post subject: Reply with quote

The very first code, does that exist in the file already or?? I can't find it in the file....

Any help?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Versatile



Joined: 11 Aug 2003
Posts: 3

PostPosted: Wed Oct 15, 2003 5:27 pm    Post subject: Reply with quote

I've made a few little adjustments because i wanted to make the "title" work.

<?
if (!isset($friendstrans)) {
$friendstrans = array(
'Manderijn' => 'www.manderijn.com---Manderijns Eigen Blogje',
'Toh' => 'www.toh.nu---Edo’s Weblog',
);
}
# generates friends' search & replace arrays
foreach($friendstrans as $friend => $url) {
$friendssearch[] = $friend;
$friend_masked = '';
for ($ii = 0; $ii < strlen($friend); $ii = $ii + 1) {
$friend_masked .= substr($friend, $ii, 1);
}
$newfriend =str_replace ( '[', ' ', $friend);
$newfriend2=str_replace ( ']', ' ', $newfriend);
list ($url , $title) = split ('\-\-\-' , $url);
$b2_friendsreplace[] = "<a href='http://$url' target='_blank' TITLE='$title'>$newfriend2</a>";
}
?>
_________________
"Unix IS user friendly
- it's just selective about who its friends are. "
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Joey



Joined: 06 Jun 2003
Posts: 5

PostPosted: Thu Nov 27, 2003 3:47 am    Post subject: Reply with quote

I pasted the code and to my horror when I opened b2edit.php in my browser tons of error messages came out. I guess I screwed up the files and I replaced them.

Maybe someone can be helpful by giving us the files that includes the hacks, so that we wouldnt accidentally include it in the wrong line...

Okay, here's the errors that came out:

Code:

Warning: Invalid argument supplied for foreach() in /home/virtual/site129/fst/var/www/html/b2/b2-include/b2vars.php on line 271

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site129/fst/var/www/html/b2/b2-include/b2vars.php:271) in /home/virtual/site129/fst/var/www/html/b2/b2login.php on line 294

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site129/fst/var/www/html/b2/b2-include/b2vars.php:271) in /home/virtual/site129/fst/var/www/html/b2/b2login.php on line 295

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site129/fst/var/www/html/b2/b2-include/b2vars.php:271) in /home/virtual/site129/fst/var/www/html/b2/b2login.php on line 296

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site129/fst/var/www/html/b2/b2-include/b2vars.php:271) in /home/virtual/site129/fst/var/www/html/b2/b2login.php on line 297

Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site129/fst/var/www/html/b2/b2-include/b2vars.php:271) in /home/virtual/site129/fst/var/www/html/b2/b2login.php on line 298


help

I wonder if it's possible for some links to open up in a new window and some links to open in the same one?
Back to top
View user's profile Send private message
Meiyo



Joined: 27 Nov 2003
Posts: 3

PostPosted: Thu Nov 27, 2003 11:28 pm    Post subject: Reply with quote

maybe you should tell us EXACTLY where to place those codes....because you haven't really told us where exactly therefore if we place it in the wrong place then it could screw up our blog...
Back to top
View user's profile Send private message
un-perfect



Joined: 18 Aug 2003
Posts: 4

PostPosted: Sun Jan 25, 2004 1:07 am    Post subject: Where??? Reply with quote

I know what folders to put them in but where to place them in the folder is what i do not understand!!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
flowerglen



Joined: 27 May 2003
Posts: 24

PostPosted: Thu Mar 04, 2004 6:06 pm    Post subject: Reply with quote

Gadget Girl wrote:
I posted this hack on my tutorial page: www.graphics-by-sara.com/tutorials/ Maybe that will help you! Smile

your site isnt coming up!
Back to top
View user's profile Send private message
tabii



Joined: 28 Apr 2004
Posts: 3
Location: USA

PostPosted: Wed Apr 28, 2004 6:24 pm    Post subject: Reply with quote

it didnt work at first for me either, but you have to put it in certain places.

Quote:
$friendstrans = array(
'daynah' => 'girl.daynah.net',
'dodo' => 'www.pure-essence.net' );


cannot go at the top of b2vars.php. i put it right after

Quote:
$b2_bbcode['out'] = array(
'<strong>$1</strong>', // Formatting tags
'<em>$1</em>',
'<span style="text-decoration:underline">$1</span>',
'<span style="text-decoration:line-through">$1</span>',
'<span style="color:$1">$2</span>',
'<span style="font-size:$1px">$2</span>',
'<span style="font-family:$1">$2</span>',
'<img src="$1" alt="" />', // Image
'<a href="$1">$1</a>', // URL
'<a href="$1" title="$2">$2</a>',
# "'<a href=\"mailto:'.antispambot('\\1').'\">'.antispambot('\\1').'</a>'", // E-mail
# '<a href="mailto:$1">$2</a>'
);

with the other code for that page right after that and it worked just fine.



i put this

Quote:
function convert_friends($content) {

global $friendssearch, $b2_friendsreplace;

$content = str_replace($friendssearch, $b2_friendsreplace, $content);

return ($content);
}


where the other "function convert_blah blah's were. (like convert bbcode)

and changed
Quote:
$content=convert_friends($content);


to

Quote:
$content = convert_friends($content);


(with spaces infront of and behind the equal) and now the hack works. I'm not sure which it was.. sorry if this was confusing. just trying to help.
Back to top
View user's profile Send private message Visit poster's website AIM Address
submodalities



Joined: 01 Apr 2004
Posts: 9

PostPosted: Wed May 19, 2004 11:16 pm    Post subject: Reply with quote

This is an awesome hack! Smile

Works like a charm .... so simple!
Back to top
View user's profile Send private message
Damita



Joined: 26 Feb 2003
Posts: 9
Location: England

PostPosted: Mon Aug 09, 2004 1:21 pm    Post subject: Reply with quote

Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/digitald/public_html/blog/b2-include/b2vars.php on line 278

problems? Can not see what I have doen wrong

Code:

$friendstrans = array(
'mel' => 'www.melly.co.uk' );
'mellie' => 'www.melly.co.uk' );
'dad' => 'www.leaning.co.uk' );
'rhi' => 'www.simply-charmed.net' );
'rhiain' => 'www.simply-charmed.net' );
'college' => 'www.simply-charmed.net' );
'col' => 'www.simply-charmed.net' );
'charmed' => 'www.simply-charmed.net' );
'harry potter' => 'harrypotter.warnerbros.com/' );
'ebay' => 'www.ebay.co.uk' );
'PMB' => 'www.piecesmended.org' );
'lush' => 'www.lush.co.uk' );
'work' => 'www.sainsbury.co.uk/' );
'weather' => 'www.bbc.co.uk/print/weather/5day.shtml?world=4380&print' );
'Cyberpixels' => 'www.cyberpixels.com' );
'PennyPinch' => 'www.pennypinch.com' );
'brandy' => 'atomic-fluff.net/' );
'jen' => 'www.piecesmended.org' );
'rachel' => 'alohamora.org/' );
'deviantART' => 'damitakisses.deviantart.com/' );
'pictures' => 'damitakisses.deviantart.com/' );
'Fanfiction' => 'fanfiction.net/' );
'story' => 'www.fanfiction.net/~digitaldamita' );


# generates friends' search & replace arrays
foreach($friendstrans as $friend => $url) {
   $friendssearch[] = $friend;
   $friend_masked = '';
   for ($ii = 0; $ii < strlen($friend); $ii = $ii + 1) {
      $friend_masked .= substr($friend, $ii, 1);
   }
   $b2_friendsreplace[] = "<a href='http://$url' target='_blank'>$friend_masked</a>";
}

Back to top
View user's profile Send private message Visit poster's website AIM Address
stevem



Joined: 15 Mar 2003
Posts: 249

PostPosted: Mon Aug 09, 2004 11:19 pm    Post subject: Reply with quote

It would help if you said which line 278 is Smile but you have too many brackets.
); should only be at the end, all other lines should just have a comma so you get
Code:
$friendstrans = array(
'mel' => 'www.melly.co.uk',
'mellie' => 'www.melly.co.uk',
'dad' => 'www.leaning.co.uk',
'rhi' => 'www.simply-charmed.net',
'rhiain' => 'www.simply-charmed.net',
'college' => 'www.simply-charmed.net',
'col' => 'www.simply-charmed.net',
'charmed' => 'www.simply-charmed.net',
'harry potter' => 'harrypotter.warnerbros.com/',
'ebay' => 'www.ebay.co.uk',
'PMB' => 'www.piecesmended.org',
'lush' => 'www.lush.co.uk',
'work' => 'www.sainsbury.co.uk/',
'weather' => 'www.bbc.co.uk/print/weather/5day.shtml?world=4380&print',
'Cyberpixels' => 'www.cyberpixels.com',
'PennyPinch' => 'www.pennypinch.com',
'brandy' => 'atomic-fluff.net/',
'jen' => 'www.piecesmended.org',
'rachel' => 'alohamora.org/',
'deviantART' => 'damitakisses.deviantart.com/',
'pictures' => 'damitakisses.deviantart.com/',
'Fanfiction' => 'fanfiction.net/',
'story' => 'www.fanfiction.net/~digitaldamita' );
Back to top
View user's profile Send private message
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
Page 4 of 4

 
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