Welcome, Guest. Please Login or Register.
November 06, 2024, 07:27:19 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.51/1.52] YaBB Moods Mod UPDATED 5/20/03 « previous next »
Pages: 1 [2] 3 Reply Ignore Print
Author Topic: [Done 1.51/1.52] YaBB Moods Mod UPDATED 5/20/03  (Read 5843 times)
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #15 on: May 20, 2003, 05:09:55 PM »
Reply with quote

Ok... Just so everyone knows, a new bug has been found - you can't reorder the moods (for some odd reason). Everytime I try it just ignores what I'm trying to do...
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #16 on: May 20, 2003, 10:45:51 PM »
Reply with quote

Just installed this mod here: http://www.edvd.org.uk/forums/

Everything seems to be ok but it's giving me an sql error.

I followed these steps to install.

Applied mod manually as boardmod didn't want to work. Have rechecked each step and am fairly confident th code is right.

Upload modified files.
Added moods.php to sources, chmod 755.
Ran moods_db.php, ok
Ran install_moods.php, ok

Checked forum all was fine. In admin edit and add moods are present. Add moods doesn't seem to anything.

Added <yabb mood> to template and now get:

QuoteWarning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /usr/local/psa/home/vhosts/edvd.org.uk/httpdocs/forums/Sources/Subs.php on line 158

Code from Subs is:


function yymood() {
   global $db_prefix, $cgi, $imagesdir, $moodtxt, $username;
   $mood = mysql_query("SELECT * FROM {$db_prefix}moods ORDER BY oid ASC");
   
   $usermood = mysql_query("SELECT mood,mood_filename FROM {$db_prefix}members WHERE (memberName='$username')");
   $currmood = mysql_fetch_row($usermood);

   if ($currmood[0] != '')
      echo $moodtxt[0] . ': <img src="' . $imagesdir . '/' . $currmood[1] . '" border="0" alt=' . $currmood[0] . ' /><br /><br />';

if ($username != 'Guest') {
   echo $moodtxt[1];
      while ($mood = mysql_fetch_row($moods)) {
         echo '<a href="' . $cgi . ';action=changemood;id=' . $mood[0] . '"/><img src="' . $imagesdir . '/' . $mood[2] . '" alt=' . $mood[1] . ' border="0" /></a>';
         }
      }
}




Where have I gone wrong.

I've tried removing the tables and new fields from the database and reapplying the sql update but it made no difference.

???
Logged


Visit the Movie Compound![/url]
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #17 on: May 20, 2003, 11:21:30 PM »
Reply with quote

I've got it working, after a lot of starring at the code blankly, by changing this line

   $mood = mysql_query("SELECT * FROM {$db_prefix}moods ORDER BY oid ASC");

into

   $moods = mysql_query("SELECT * FROM {$db_prefix}moods ORDER BY oid ASC");

:)
Logged


Visit the Movie Compound![/url]
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #18 on: May 20, 2003, 11:49:59 PM »
Reply with quote

I figured it out... Somehow, in the process of editing the mod, $moods got changed to $mood. It should be $moods.

Sorry about that!

Now, there is still one big bug: the reorder thing doesn't work. First I thought it was because I had the wrong "action" value for the form, but even after I fixed that, it still won't work properly. Anyway, just do what you can to fix the errors. I should have a working update sometime tomorrow.

Also, one thing you can fix right now is a bug I didn't notice until after I released the update - adding moods doesn't work either. Here's how to fix that:

in moods.php, search for the form action declaration in the AddMoods() function. You will see it says "action="' . $cgi . ';action=addmoods". That should say addmoods2.

I'm still trying to figure out why the order thing doesn't work, and hopefully I'll have that fixed soon.
« Last Edit: May 21, 2003, 07:03:23 PM by oldiesmann » Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #19 on: May 21, 2003, 12:30:37 AM »
Reply with quote

well I thought I had got it working but also had to change the following in moods.php

function ChangeMood() {
   global $username, $db_prefix, $moodtxt, $id;
   
   $query = mysql_query("
            SELECT name, filname
            FROM {$db_prefix}members
            WHERE id = '$id'");


into

function changemood() {
   global $username, $db_prefix, $moodtxt, $id;
   
   $query = mysql_query("SELECT name, filename FROM {$db_prefix}moods WHERE id='$id'");
Logged


Visit the Movie Compound![/url]
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #20 on: May 21, 2003, 12:37:12 AM »
Reply with quote

Made the change to the form addmoods2 section.

Now my mood works, but I can't add any further moods. Is there a limit to the amount you can add? Also when I go to edit moods none show up.

« Last Edit: May 21, 2003, 12:40:49 AM by sharkey » Logged


Visit the Movie Compound![/url]
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #21 on: May 21, 2003, 04:14:48 PM »
Reply with quote

I'm going to be posting a temporary update in a few minutes to fix all the problems (except for the editing moods) that occurred with the one I posted yesterday. Don't worry about editing moods right now because I'm still trying to figure out why that won't work.
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #22 on: May 21, 2003, 07:06:03 PM »
Reply with quote

Ok. I uploaded a working update (replacing the buggy one from yesterday). Hopefully I'll get the reordering thing working soon. Cool site btw sharkey :)
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #23 on: May 22, 2003, 03:27:53 PM »
Reply with quote

I'm about to try and update with the new fixed version :) I'll let you know how it goes. When you say "cool site" do you mean where my sig image leads to?

The previous link I posted is my testing grounds. I'm setting up a new installation of the forums with all the mods I want then I'm going to attempt to transfer by existing yabb database to it. Maybe not the right place to ask but any tips on backing up and transfering a database?
Logged


Visit the Movie Compound![/url]
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #24 on: May 22, 2003, 06:15:50 PM »
Reply with quote

Just use the "dump database" option in the admin center on YaBB... Then, go to your new site, go into phpMyAdmin and point it to the sql file on your hard drive. And yes, the site I was talking about is the one your sig image leads to.
« Last Edit: May 22, 2003, 06:16:56 PM by oldiesmann » Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #25 on: May 22, 2003, 06:28:38 PM »
Reply with quote

Quote from: oldiesmann on May 22, 2003, 06:15:50 PM
Just use the "dump database" option in the admin center on YaBB... Then, go to your new site, go into phpMyAdmin and point it to the sql file on your hard drive. And yes, the site I was talking about is the one your sig image leads to.

Ok that's where my problem is. Where I am currently located is my new site. Thanks for the positive comments. :) I'm using an old site to setup the new board and get it running. I then want to transfer the installation to my new site but keep all the exisiting posts and members that I have there. Sorry for discussing this in your mod topic, if you have any ideas of how to go about doing it feel free to IM or mail me so we don't clutter up this topic too much ;)
Logged


Visit the Movie Compound![/url]
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #26 on: May 22, 2003, 07:57:56 PM »
Reply with quote

No problem. I hope to have the problem with the edit moods feature fixed soon.
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
nargalzius
Noobie
*
Posts: 1


Hola!

Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #27 on: May 23, 2003, 05:17:07 AM »
Reply with quote

ok, i've followed everything to the dot, to sharkeys modifications, to downloading the recent zips in oldies server.

i kinda narrowed down the problem on my board.

it wont update the sql, or rather it puts NULL values on it.

example, i put the values into the database (mood, moo_filename) directly and the pages follow suite (user mood appears, etc. etc.)

but when i click on the <yabb mood> generated icons, it disappears. . . i check the db again and the value was set to NULL (or blank)

what gives?

also in the admin center, not only can i not change the order (which was already stated as an unsolved bug as of the moment, but even adding and renaming the moods aren't possible. Is this connected somehow?

it's strange cause when I use the mood_install.php file and add through there, the database IS updated accordingly, but through the admin center, it just shoots me back to to the admin center home
« Last Edit: May 23, 2003, 05:38:39 AM by nargalzius » Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #28 on: May 23, 2003, 12:53:25 PM »
Reply with quote

Renaming the moods is part of the unsolved bug. The adding moods thing is probably easy to fix. Make sure that the form action line says something like <form action="' . $cgi . ';action=addmoods2" in the beginning of the AddMoods() function in Moods.php. What's the URL of your board? Send me the url to your board and the FTP info via email or PM and I'll drop by later and see what I can do for you.
« Last Edit: May 23, 2003, 12:54:40 PM by oldiesmann » Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
sharkey
Jr. Member
**
Posts: 51


sharkey0903@hotmail.com WWW
Re:[Done 1.51/1.52] YaBB Moods Mod Updated 5/20/03
« Reply #29 on: May 23, 2003, 06:03:11 PM »
Reply with quote

Change mood function works if you make two small changes. There's still a typo in the file. In ChangeMood () you need to find filname and change it to filename. Also in the same function, next line down change the word members to moods.

Neither add or edit works. Add just directs back to the main page after you fill in the form. Edit doesn't list the current moods. I can get it to pick out the moods by changing this line

   $get_moods = mysql_query("SELECT * FROM {$db_prefix}moods WHERE id='$id' ORDER BY oid ASC");

in the modify functions to

   $get_moods = mysql_query("SELECT * FROM {$db_prefix}moods ORDER BY oid ASC");
Logged


Visit the Movie Compound![/url]
Pages: 1 [2] 3 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.51/1.52] YaBB Moods Mod UPDATED 5/20/03 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.038 seconds with 20 queries.