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 

Moods for b2customfields
Goto page 1, 2  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: Fri Apr 25, 2003 9:22 pm    Post subject: Moods for b2customfields Reply with quote

While testing Ogre's moods hack for inclusion of this script on my b2 resource site I ran into some minor problems as I already have Mystis' b2customfields hack installed.

After some messing around I found a simple way of putting the two together - at least for IE (not tested in other browsers).

Information and download available here

Ruud


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



Joined: 28 Apr 2003
Posts: 7
Location: The Wired

PostPosted: Mon Apr 28, 2003 12:58 am    Post subject: Problem... Reply with quote

I have a problem with this hack =/

Quote:

Fatal error: Call to undefined function: getcustom() in d:\wwwroot\gm\coldsoul\b2-include\psuedomoods.php on line 34


And, when i change the 'getcustom' with 'getcustomfield' then only display the name of the file and not the image...

(Yes, my english it's bad... )
Back to top
View user's profile Send private message Visit poster's website AIM Address
Ruud



Joined: 12 Oct 2002
Posts: 77

PostPosted: Mon Apr 28, 2003 3:10 am    Post subject: Reply with quote

Thanks for pointing that out! The hack relies on a customised b2customfields function.

Please open b2template.functions.php and paste in this code:

Code:
function getcustom($name){
   global $tableposts,$id;
   $sql = "SELECT ".$name." from ".$tableposts." where id = ".$id." LIMIT 1";
   $result = mysql_query($sql);
   while ($row = mysql_fetch_array($result)){
      $output = $row[$name];
   }
   $output = convert_bbcode(convert_smilies(stripslashes($output)));
   return ($output);
}


All should work fine now.

Explanation:
b2customfields returns the output of the customfield to screen using 'echo'. The function above takes the output and gives it back as a variable so it can be used as a parametre elsewhere.

Note:
The download has now been edited to reflect this modifcation.

Ruud
Back to top
View user's profile Send private message Visit poster's website
Dracil



Joined: 24 Apr 2003
Posts: 5

PostPosted: Tue Apr 29, 2003 7:16 pm    Post subject: Reply with quote

So that's why! I thought it might've been something like that but wasn't sure, then I saw the b2customfields variable hack yesterday, and that's when I realized it wasn't a mistake. I already modified it to just keep the dropdown so that I can have a more custom mood (e.g. "hungry and tired") and choose whatever moodpic to go with it. It might be useful though, to have the mood pictures show up in the dropdown (like as an option)
Back to top
View user's profile Send private message
Ogre



Joined: 18 Feb 2003
Posts: 11

PostPosted: Wed Apr 30, 2003 2:38 am    Post subject: Reply with quote

Hehe, gets that solves that problem. Razz Like I said in my install, I wanted to speak with b2customfields creator, but I guess you helped me dodge that bullet. >Very Happy
_________________
Certifiably Insane, and loving it.
The Blargh | My Board Masterpiece (home of Assault Battle)
Back to top
View user's profile Send private message AIM Address
Ruud



Joined: 12 Oct 2002
Posts: 77

PostPosted: Wed Apr 30, 2003 3:21 am    Post subject: Reply with quote

And thanks to you Ogre for the original hack! I know a lot of bloggers like this mood-stuff. Full credits your way!

Ruud
Back to top
View user's profile Send private message Visit poster's website
Ogre



Joined: 18 Feb 2003
Posts: 11

PostPosted: Thu May 01, 2003 7:33 pm    Post subject: Reply with quote

Just a note: I edited the readme to link here and the site you posted with the info on it, so anyone that downloads it won't have to find this thread manually. (and fixed the typos Nullswitch pointed out)
_________________
Certifiably Insane, and loving it.
The Blargh | My Board Masterpiece (home of Assault Battle)
Back to top
View user's profile Send private message AIM Address
Candle



Joined: 23 Dec 2002
Posts: 547

PostPosted: Thu May 01, 2003 8:03 pm    Post subject: umm Reply with quote

I would think that they both work togather that maybe take both hacks and make one out of it so one does not have to download two hacks ? less chance of messing up . Smile
_________________
My Game Forum
Back to top
View user's profile Send private message
Ruud



Joined: 12 Oct 2002
Posts: 77

PostPosted: Fri May 02, 2003 12:04 am    Post subject: Reply with quote

@ Candle: Well...eventually...

As I'm testing and installing every hack here I also put them in what was a virgin b2 install. When finished with the last page of the forum what we have to offer the new b2 people is a fully hacked b2 Very Happy

@ Ogre: Thanks for the heads-up. Download updated.

Ruud
Back to top
View user's profile Send private message Visit poster's website
Candle



Joined: 23 Dec 2002
Posts: 547

PostPosted: Fri May 02, 2003 12:18 am    Post subject: Reply with quote

Ruud wrote:
@ Candle: Well...eventually...

As I'm testing and installing every hack here I also put them in what was a virgin b2 install. When finished with the last page of the forum what we have to offer the new b2 people is a fully hacked b2 Very Happy

@ Ogre: Thanks for the heads-up. Download updated.

Ruud


That works for me .
_________________
My Game Forum
Back to top
View user's profile Send private message
kilj00ydnb



Joined: 10 Sep 2003
Posts: 2
Location: NC

PostPosted: Fri Sep 12, 2003 12:07 pm    Post subject: Reply with quote

anyone got a mirror for this? or can paste the edited section of b2edit.php and b2edit.form.php? ive been tryin this for days now to no avail...
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Ruud



Joined: 12 Oct 2002
Posts: 77

PostPosted: Fri Sep 12, 2003 5:09 pm    Post subject: Reply with quote

Link is in your inbox Smile

Ruud
Back to top
View user's profile Send private message Visit poster's website
starxduzt



Joined: 13 Sep 2003
Posts: 2
Location: Tampa, FL

PostPosted: Sat Sep 13, 2003 6:17 am    Post subject: Reply with quote

Hi, I tried the link and it doesn't work. Do you have a new link for it? My email is [email protected] if you don't want to post it here.
Back to top
View user's profile Send private message Visit poster's website
Ruud



Joined: 12 Oct 2002
Posts: 77

PostPosted: Sat Sep 13, 2003 7:09 am    Post subject: Reply with quote

http://www.dawolfden.com/b2customfield-ruud.Sun.zip

Ruud
Back to top
View user's profile Send private message Visit poster's website
spirit892



Joined: 15 Jul 2003
Posts: 9
Location: PA, USA

PostPosted: Sun Jan 04, 2004 6:08 pm    Post subject: Reply with quote

That whole site isn't working. Is there anywhere else that could provide a download?
_________________
kathleen
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
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