Stars and Badges

Started by Bulakbol, February 29, 2008, 11:59:19 PM

Previous topic - Next topic

perpetuallove

Quote from: JohnyB on March 02, 2008, 03:19:36 PM
Quote from: perpetuallove on March 02, 2008, 07:56:07 AM
I got that same error listed above but installed anyways after making a backup. The question i have is where do i add those codes if my theme doesnt have a display.template or whatever file? I am using TP january theme :)

I tried modifying the default theme but that didnt do it either....... am i gonna have to do it all manually?
Thanks!

Hi Perpetuallove. Sorry for the delay. If your theme does not have Display.template.php, it must be using the one from the default theme.  You have to edit only the file that failed the test.

aw i see- so do i need to change it in the default display one? also- the one that failed the test was the   Sources/Load.php ........ what do i need to edit from that?

Your welcome for trying it- i cant wait to get it working cuz its perfect for the type of forum i have :)

Bulakbol

Hi Perpetuallove. You don't have to edit the Display.template.php from the default folder. It is already edited by the mod. Edit only the Sources/Load.php. Look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,

or if you cannot find the whole line, just look for
pg.onlineColor AS post_group_color,

and insert
mem.additionalGroups,

Then look for
'post_group_color' => $profile['post_group_color'],

and below it, add
'additional_groups' => array(
'id' => array(),
'stars' => array(),
'name' => array(),
),


More to look for.  :) Find
return true;
}

// Load a theme, by ID.


and replace with
$groups = $profile['additionalGroups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = db_query("
SELECT stars, ID_GROUP, groupName
FROM {$db_prefix}membergroups
WHERE ID_GROUP IN (" . $groups . ')
', __FILE__, __LINE__);

// Loop through the additional groups...
while ($row_stars = mysql_fetch_assoc($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['ID_GROUP'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['groupName'];
}
mysql_free_result($result_stars);
}

return true;
}

// Load a theme, by ID.


That's all for the Sources/Load.php. If you are not confortable doing the edit, attach your Load.php and I'll do it for you.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

perpetuallove

That would be awesome if you would do that for me :) but i cant find it! I dont see that file in the themes folder I am using or in the default? hmmm......

Bulakbol

Quote from: perpetuallove on March 03, 2008, 04:11:02 AM
That would be awesome if you would do that for me :) but i cant find it! I dont see that file in the themes folder I am using or in the default? hmmm......

Hi again Perpetuallove. You can find the Load.php in the Sources folder and not default folder. You can attach here so I can look at it and make the changes for you.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

radel

Hi,

I really was looking for a mod like this.

Anyway, I managed to install the mod but it will only show the badge for the primary usergroup. The additional or secondary usergroup/s will only show an "*" both in post and profile.

I tried editing the Load.php but I still wasnt able to get it to work. So  I uninstalled the mod for the meantime.

Any idea whats causing my problem?

Im using the NewDef theme for TP.

The unedited Load.php is attached.

Bulakbol

Hi Radel. Did you use the package manager? Were there any errors when you installed the mod? If there are errors, then I need only the files that failed the test.  If there's no error, then I need only the Display.template.php of your custom theme. Attach the files that failed the test and your custom Display.template.php so i can edit it for you.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

islam2hamy


Arabic Translator - Web Designer
My Mods / My Themes  //  GfxLand





Bulakbol

Quote from: islam2hamy on March 03, 2008, 10:13:38 AM
thank you
good mod

awww I thank you for the compliment Islam2hamy.  8)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

radel

I used the package manager to install the mod.

Only Load.php failed the test when i installed it so i tried to edit the file.

As I have said in my other post, my badge for my primary group shows just fine, its just that the secondary or additional group badge or star wont show anything but an *

Also there is no display.template.php for the theme that I am using.

Thanks for your time.

Bulakbol

Ok Radel. I'll look at your Load.php and I'll get back to you.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

radel

Thanks.

As far as I can tell this mod is really great and I would be sad if I cant use it in my forum.

Anyway, here are 2 screenshots of what I am talking about.



As I said only an * will show instead of badges.  :)

Bulakbol

Here;s your Load.php Radel. And if still won't work, your site link will help.

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Shortrnd

#32
My issues are a bit different now.  If I put someone in a primary usergroup then their post count images don't show.  If I remove them from all primary membergroups and use the show additional groups then it will work...... sort of.

I'm now getting double images of the membergroup stars.  It does look correct in the profile summary however.

Also, the membergroup titles are showing either.  Perhaps because they're not in primary membergroups?



Thanks again for the help


Bulakbol

Hi Shortrnd. Attach your Display.template.php and I'll take a look at it first. Maybe there's double line in there. You probably pasted the code under the code that suppose to be replaced. I'll grab the alienation theme so I can have visual check.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Shortrnd

Ok it's attached to the post above. 

Bulakbol

Shortrnd, here;s your Display.template.php. I deleted the other codes. It was istalled twice. Try that one first then if problem persist, I'll login to your site.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Shortrnd

That's works much better.

Any idea why I can't get the post counts to show when I put someone in a primary membergroup?  Here's what I'm talking about.



PM sent on my site btw.

Bulakbol

#37
Quote from: Shortrnd on March 03, 2008, 02:39:01 PM
That's works much better.

Any idea why I can't get the post counts to show when I put someone in a primary membergroup?  Here's what I'm talking about.



PM sent on my site btw.

Wait, I'll check your Display.template,php again. There might be missing code in there.

<EDIT>
I can't find anything wrong Shortrnd. The images have both post counts in them.  Is it post count or post group name that you are looking for?
</EDIT>
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

franklinrony

i wait for 2 years this mods only found to rc2! thanks my friend
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Bulakbol

Well, grab two copies then.  :P  You're welcome and thank you too for trying this mod.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: