MyBB Central
My Awards 1.3 - Printable Version

+- MyBB Central (http://www.mybbcentral.com)
+-- Forum: Archives (http://www.mybbcentral.com/forum-33.html)
+--- Forum: Mybb 1.4x Series Topics (http://www.mybbcentral.com/forum-26.html)
+---- Forum: Mybb 1.4x Plugins and Hacks (http://www.mybbcentral.com/forum-27.html)
+---- Thread: My Awards 1.3 (/thread-1782.html)



RE: My Awards 1.2 - Max C. - Feb 22, 2009

I just PMed you on YCM about it. I think it should just be a simple template edit.


RE: My Awards 1.2 - Arosa - Feb 22, 2009

This is just the plugin I have been waiting for!

Thank you very much for making so many great and useful plugins, you're a great guy!


RE: My Awards 1.2 - rapid - Feb 22, 2009

Installed and no problems, great plugin thanks


RE: My Awards 1.2 - rapid - Feb 22, 2009

Sorry one problem, i do not want guests to view the Recipients page,
how do I stop them from viewing this please.


RE: My Awards 1.2 - Max C. - Feb 22, 2009

(Feb 22, 2009, 02:53 AM)Elegant Totality Wrote: I just PMed you on YCM about it. I think it should just be a simple template edit.

I thought it was, but I was wrong. Labrocca, how do you change it from one end of the postbit to another?


RE: My Awards 1.2 - labrocca - Feb 22, 2009

You should be able to edit postbit template.

Somewhere in this probably:

<span class="smalltext">
{$post['usertitle']}<br />
{$post['userstars']}
{$post['groupimage']}
</span>

Then you have to change the function in inc/plugins/my_awards.php

$post['user_details'] = str_replace("<!-- AWARDS -->", $awards, $post['user_details']);

To

$post['postbit'] = str_replace("<!-- AWARDS -->", $awards, $post['postbit']);

I think that will do it...you may need to alter that plugin more but I think it's right. Let me know.


RE: My Awards 1.2 - ycmaker - Feb 22, 2009

That didn't seem to work. The <!-- AWARDS --> placeholder appears on the page source, but it isn't being replaced by the function.

Update: I found a way around this problem. I added:

{$post['userawards']}

to the template, and replaced

$post['postbit'] = str_replace("<!-- AWARDS -->", $awards, $post['postbit'])

with

$post['userawards'] = $awards;


RE: My Awards 1.2 - labrocca - Feb 22, 2009

That works too. Smile

btw...try just placing {$awards} in your template. Curious if that will work because it should.

Then you can get rid of the str_replace for faster parsing.


RE: My Awards 1.2 - ycmaker - Feb 22, 2009

I tried that at first, but for some reason I don't think it was working. Perhaps I was doing something wrong, but either way, it's working now so I'll probably just leave it as is.


RE: My Awards 1.2 - Max C. - Feb 22, 2009

Wink Congrats YCMaker, sorry if I wasn't any help