Author Topic: SMFPets is Finally Here (0.1 out)  (Read 109665 times)

Offline sasafetch

Re: SMFPets is Finally Here (0.1 out)
« Reply #180 on: April 14, 2007, 12:39:51 am »
i'm using the latest one.

Offline Jen

Re: SMFPets is Finally Here (0.1 out)
« Reply #181 on: April 14, 2007, 02:07:12 am »
Hello.

I just installed this today and I want to make sure I have everything and understand.

Install was fine, however, I don't have anything in the shop in admin control about adding pets. BUT there is a Pet Hatchery in the shop itself. Is this correct?

I don't see a Pet Central? Should I have that?

Thanks again.


EDIT: Got it, but when I went to use a skill, the image isnt showing up. Here is the property for the image

http://mysite.com/home/content/t/h/e/thegame212/html/board/Sources/shop/pet_images/Bird01.gif

It's like it added the server direc along with the actual site.


Edit #2

Fixed it, I had to edit the directories my images are in.

All is good now :) Cheers for this awesome addon.
« Last Edit: April 14, 2007, 03:05:07 am by Jen »

Offline Jen

Re: SMFPets is Finally Here (0.1 out)
« Reply #182 on: April 14, 2007, 04:24:27 am »
OK, here's the skinny:

in Load.php find:
Code: [Select]
$row['options'] = array();
$user_profile[$row['ID_MEMBER']] = $row;
}
mysql_free_result($request);
add below that:
Code: [Select]
//Load the pet data
$request2 = db_query("
SELECT COUNT(*) AS pets, ownerid
FROM {$db_prefix}shop_pets
WHERE ownerid IN ('" . implode("', '", $loaded_ids) . "')
GROUP BY ownerid", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request2))
$user_profile[$row['ownerid']]['pets'] = $row['pets'];
mysql_free_result($request2);

then find:
Code: [Select]
'post_group' => $profile['post_group'],
add below:
Code: [Select]
//another pets modification
'pets' => &$profile['pets'],

then in the display template.php find the code you suggested and add this below instead:
Code: [Select]
//finally a pets button
if ($message['member']['can_view_profile']){
if($message['member']['pets'] > 0){
echo '
<a href="', $message['member']['href'], ';sa=showPets">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/pets.gif" alt="' . $txt[27] . '" title="' . $txt[27] . '" border="0" />' : $txt[27]), '</a>';
}
}

this will only show the link to the members pets in profile on two conditions:
     1. person can view profiles
     2. member actually has a pet

there you go...ENJOY!

Perfect. One question, how can we set it to where when hovered over the paw image, it says View Pets instead of View Profile?

Offline sasafetch

Re: SMFPets is Finally Here (0.1 out)
« Reply #183 on: April 15, 2007, 03:03:57 am »
Ok does anyone else have this problem?  I have TechnoDragon's pet items installed, namely increase max ap, increase happiness, and increase health.  I've also updated the pete engine tot he latest version.  0.1.  Now, my useres always get this error whenever they try to access the shop.  Aka, my entire shop is down now because something went wrong with the pet mod.  I keep getting these update database errors everywhere.  How the heck do I update my database?  And if I don't have to, what the hell is wrong??

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'red dangly part',
level = 1,
curap = 1,
maxap =' at line 2
File: /home/ninjasan/public_html/forum/Sources/shop/pet_engine.php
Line: 298

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

It'd be nice if you guys could help me with this.  My entire site revolves around the shop system, and today is the day I tally the 2 different team's credit totals in order to determine whom is in control.  I can't really do that though, seeing as how the whole shop is down.  Help please.
« Last Edit: April 15, 2007, 03:08:31 am by sasafetch »

Offline sasafetch

Re: SMFPets is Finally Here (0.1 out)
« Reply #184 on: April 15, 2007, 03:16:26 am »
Never mind, i figured it out.  all of my problems keep happening because people keep putting apostrophes in the text fields.  Is there any way to format the pets mod so that it checks for these apostrophes and corrects them?

Offline sjmarsha

Re: SMFPets is Finally Here (0.1 out)
« Reply #185 on: April 18, 2007, 12:10:41 am »
Hi everyone. I keep trying to download the SMF pets 0.1 version (I already have 0.0) but the download link will not work. Does anyone else have it that I can download? I have a few glitches and spelling errors I'd like to fix, hoping the update will fix them. I just wish I could download it. I tried this link - http://dev.dansoftaustralia.net/frs/?group_id=10 but I just get server timed out errors.
Thanks to anyone who can give me a new link or download to it!

Offline Jen

Re: SMFPets is Finally Here (0.1 out)
« Reply #186 on: April 18, 2007, 12:18:10 am »

Offline sjmarsha

Re: SMFPets is Finally Here (0.1 out)
« Reply #187 on: April 18, 2007, 12:29:44 am »
That worked. Thank you so much!

Offline sjmarsha

Re: SMFPets is Finally Here (0.1 out)
« Reply #188 on: April 18, 2007, 12:52:12 am »
ahhh dang, I still get the error -

Quote
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' happy = happy + WHERE pet_id = 2 AND ownerid = 1' at line 1
File: /home/informed/public_html/forum/Sources/shop/items/Food.php
Line: 82

when I try to give food to my pet. I tried the food fix that was mentioned earlier on, but it didn't work. Anyone have any ideas on this error?

Offline Basil Beard

Re: SMFPets is Finally Here (0.1 out)
« Reply #189 on: April 18, 2007, 02:24:35 am »
Nope. SQL error's really bug me because they seem to crop up randomly.

And yeah. The dev server has been having trouble. Not alot I can do about that. Sorry!
Arrrrr!

Offline sjmarsha

Re: SMFPets is Finally Here (0.1 out)
« Reply #190 on: April 18, 2007, 02:28:12 am »
Thanks Basil. Does this mean that I'm stuck with not being able to feed our pets? My members and I really like the pets, I'd hate to have to uninstall it now  :-\

Offline Basil Beard

Re: SMFPets is Finally Here (0.1 out)
« Reply #191 on: April 18, 2007, 02:31:31 am »
Ok. I think I see the error. Its setting happy = happy + nothing. Are you sure you properly created the item in the first place? It doesn't appear to have the food increase value set.
Arrrrr!

Offline sjmarsha

Re: SMFPets is Finally Here (0.1 out)
« Reply #192 on: April 18, 2007, 02:33:48 am »
HA, I'm not sure about anything! I'm pretty clueless when it comes to this stuff. I install, I follow directions, thats all I'm good for here :) If you can tell me what to do I'll do it and thank you immensely if it works!

Offline Basil Beard

Re: SMFPets is Finally Here (0.1 out)
« Reply #193 on: April 18, 2007, 02:35:13 am »
So like, when you created the food item it should've prompted you for two values. One for like, the amount to reduce hunger and one for the amount to increase happiness.

Or are you still uses the other food item? In which case I have no idea how it works.  :D
Arrrrr!

Offline sjmarsha

Re: SMFPets is Finally Here (0.1 out)
« Reply #194 on: April 18, 2007, 02:39:02 am »
this one I added to my items folder in sources/shop and then I added it using the add items manager in the admin panel under shop. It added and it didn't ask me for anything. I'll go delete and readd it, see if I just missed something the first time. If that doesn't work maybe I should use a different food.php?