View previous topic :: View next topic |
Author |
Message |
Ruud
Joined: 12 Oct 2002 Posts: 77
|
Posted: Fri Apr 25, 2003 9:22 pm Post subject: Moods for b2customfields |
|
|
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 |
|
 |
GM
Joined: 28 Apr 2003 Posts: 7 Location: The Wired
|
Posted: Mon Apr 28, 2003 12:58 am Post subject: Problem... |
|
|
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 |
|
 |
Ruud
Joined: 12 Oct 2002 Posts: 77
|
Posted: Mon Apr 28, 2003 3:10 am Post subject: |
|
|
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 |
|
 |
Dracil
Joined: 24 Apr 2003 Posts: 5
|
Posted: Tue Apr 29, 2003 7:16 pm Post subject: |
|
|
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 |
|
 |
Ogre

Joined: 18 Feb 2003 Posts: 11
|
Posted: Wed Apr 30, 2003 2:38 am Post subject: |
|
|
Hehe, gets that solves that problem. Like I said in my install, I wanted to speak with b2customfields creator, but I guess you helped me dodge that bullet. > _________________ Certifiably Insane, and loving it.
The Blargh | My Board Masterpiece (home of Assault Battle) |
|
Back to top |
|
 |
Ruud
Joined: 12 Oct 2002 Posts: 77
|
Posted: Wed Apr 30, 2003 3:21 am Post subject: |
|
|
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 |
|
 |
Ogre

Joined: 18 Feb 2003 Posts: 11
|
Posted: Thu May 01, 2003 7:33 pm Post subject: |
|
|
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 |
|
 |
Candle
Joined: 23 Dec 2002 Posts: 547
|
Posted: Thu May 01, 2003 8:03 pm Post subject: umm |
|
|
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 .  _________________ My Game Forum
 |
|
Back to top |
|
 |
Ruud
Joined: 12 Oct 2002 Posts: 77
|
Posted: Fri May 02, 2003 12:04 am Post subject: |
|
|
@ 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
@ Ogre: Thanks for the heads-up. Download updated.
Ruud |
|
Back to top |
|
 |
Candle
Joined: 23 Dec 2002 Posts: 547
|
Posted: Fri May 02, 2003 12:18 am Post subject: |
|
|
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
@ Ogre: Thanks for the heads-up. Download updated.
Ruud |
That works for me . _________________ My Game Forum
 |
|
Back to top |
|
 |
kilj00ydnb
Joined: 10 Sep 2003 Posts: 2 Location: NC
|
Posted: Fri Sep 12, 2003 12:07 pm Post subject: |
|
|
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 |
|
 |
Ruud
Joined: 12 Oct 2002 Posts: 77
|
Posted: Fri Sep 12, 2003 5:09 pm Post subject: |
|
|
Link is in your inbox
Ruud |
|
Back to top |
|
 |
starxduzt
Joined: 13 Sep 2003 Posts: 2 Location: Tampa, FL
|
Posted: Sat Sep 13, 2003 6:17 am Post subject: |
|
|
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 |
|
 |
Ruud
Joined: 12 Oct 2002 Posts: 77
|
|
Back to top |
|
 |
spirit892
Joined: 15 Jul 2003 Posts: 9 Location: PA, USA
|
Posted: Sun Jan 04, 2004 6:08 pm Post subject: |
|
|
That whole site isn't working. Is there anywhere else that could provide a download? _________________ kathleen |
|
Back to top |
|
 |
|