Jump to content

Download: GLC Custom Icon Per user (Similar to CONTRIBUTOR icon on IPS forums)


Graeme Leighfield

Recommended Posts

Posted

File Name: GLC Custom Icon Per user (Similar to CONTRIBUTOR icon on IPS forums)
File Submitter: Graeme Leighfield
File Submitted: 26 Jul 2010
File Category: Hooks and Plugins

GLC Custom icon per user

What this hook does

This hook will allow you as admin to enter in a group of user IDs and then allocate a custom icon to be displayed underneath there profile fields in topic view.
This has nothing to do with custom profile fields and/or permissions, so there is no way that users can get this icon unless you give it to them!

Screenshot 1 - An example of what I used this for on my forums, I wanted a way for forum members to easily recognise whos going to a car show, so i added this icon to the name of everyone who has successfully paid for there ticket to this show.

Screenshot 2 - A replication of the contributor link as seen here on the IPS forums.

Screenshot 3 - ACP view, enter in the user ids seperated with a SPACE i.e "1 2 3 4 5", also shows entering code.

Enjoy - donations kindly recived at sales@glcreations.co.uk :thumbsup:

Click here to download this file

Posted

Currently its only one icon im afraid.



However I would like to expand this into an application to add multiple at a later date. Just need to learn more about the application system in IPB first :rolleyes:




Okay, sounds good. Thank you!
  • 2 months later...
  • 1 month later...
  • 2 months later...
Posted

Hmm... This isn't working for me. Re-installed it several times. I do not have a bad image URL like the previous person. I am using a custom skin, but it doesn't work on the default either.

I don't know much about IPB's code, so I'm not sure how helpful this is, but a little digging seems to indicate the problem is in this function:


        public function replaceOutput( $output, $key )

        {

                if( is_array($this->registry->output->getTemplate('topic')->functionData['topicViewTemplate'][0]['post_data']) AND count($this->registry->output->getTemplate('topic')->functionData['topicViewTemplate'][0]['post_data']) )

                {


                        $tag    = '<!--hook.' . $key . '-->';

                        $last   = 0;


                        foreach( $this->registry->output->getTemplate('topic')->functionData['topicViewTemplate'][0]['post_data'] as $pid => $post )

                        {

                                $pos    = strpos( $output, $tag, $last );


                                if( $pos )

                                {

                                        $string = $this->getPostHook( $pid, $post );

                                        $output = substr_replace( $output, $string . $tag, $pos, strlen( $tag ) );

                                        $last   = $pos + strlen( $tag . $string );

                                }

                        }

                }

                return $output;

        }



The big if statement is returning false.

Don't know if this information is helpful, but I am running a board converted from SMF 2.0RC4.

  • 7 months later...
Posted

Me too! Weird that I'd not changed the path at all but have to move it from being relative to being exact.



Well, it's great I thought of having a look at this thread because I had exactly the same problem overnight, after a long time of using this hook. And using a full path to the graphic solved it.

Now, the possible reason for the sudden change may have something to do with the changes I did after I installed IP.SEO, those changes were (in the Search Engine optimization area of ACP):

1) Redirect to new friendly URL format set to yes
2) Changed the url type from "search string" to "path info" (I'm using Apache, so it seems to make sense)
3) Use .htaccess mod_rewrite set to yes (and I added the code snippet to my .htaccess file)
4) Log all Search Engine visits set to yes

And that was it. I suspect changes 1 or 2 look like the main culprits.

On a separate note, while I was trying to sort the problem out, I couldn't find a way of uninstalling the Custom Icon hook (I couldn't find it listed among my hooks... yet it's there and still working). Just out of curiosity, how do you uninstall it?
  • 1 month later...
Posted

Is this working on 3.2 ? Its seems to be working fine, but I have a few problems on the forum, and wondering what hook it could be

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...