Jump to content

Davey

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Davey

  1. I thought I'd share this since IP.Downloads is going to be used. I figure if a user uploads a file they get the contributor badge in the member's Topic View (under their post count). I would assume that someone could make a new contributor badge.

    //==============================================

    IP.Board Topic: http://community.inv...tributor-badge/

    By Charles, IPS Staff

    //==============================================

    contributor.png

    I thought I would preempt anyone asking and just explain how we did the new contributor badge that is showing on the topic view and member profiles. This badge only shows if someone has contributed a file for download in our community resources section. We could have done this (probably better) with a hook but we chose to do it with skin edits. Here is how we did it:

    Created a new custom profile field in the AdminCP called Resource Contributors. We then populated that field with the text: Total file submissions: # (where # is the number of files). To do this we created a PHP page in IP.Content which we will execute once a day to refresh the content of that field. On our IP.Board install, the field is number 18:

    $this->DB->update( 'pfields_content', array( 'field_18' => null ) );  
    
    	$this->DB->build( array( 'select' => 'file_submitter,COUNT(*) as submissions', 'from' => 'downloads_files', 'where' => 'file_open=1', 'group' => 'file_submitter' ) );  
    	$outer = $this->DB->execute();  
    
    	while( $r = $this->DB->fetch($outer) )  
    	{  
    		 $this->DB->update( 'pfields_content', array( 'field_18' => 'Total file submissions: ' . $r['submissions'] ), 'member_id=' . $r['file_submitter'] );  
    	}
    

    The script is very short because one of the huge advantages of IP.Content is that it inherits the complete power and framework of IP.Board itself so that's all there is to it.

    Edited the custom profile field's Topic View Format setting with the following text:

    <span style='display: inline-block; margin-left: 65px; margin-top: 8px'>
    	<a href='http://community.invisionpower.com/index.php?app=core&module=search&do=user_posts&mid=#member_id#&view_by_title=&search_filter_app[downloads]=1'>
    	<img src="http://community.invisionpower.com/contributor.png" title="This member is a contributor to community resources. {content}" />
    	</a></span>

    To replace the #member_id# variable in the above code, we edited the skin template Global Templates - userInfoPane and replaced the {$field} call in that skin with:

    {parse expression="str_replace("#member_id#", $author['member_id'], $field)"}

    • Upvote 1
  2. Name: David

    Nickname: Dave or Davey

    Role: Jguy H@t3R *;..;* RAWR-!!

    Age: 26

    Location: PDC, WI

    Bio: Hmmm... where to start, I'm a spammer on Jguy's forum, which I think he is hiding from me. Other than that I lurk around the forums waiting for the right moment to post!

    Occupation: IT Support Specialist at Lady Luck Casino

    Hobbies: I like to play around with photoshop and playing RO

    Current Server: Nyxsus!

  3. I was "lucky" enough to be interview by our marketing staff, about 3 weeks ago, and the interview has just been posted on YouTube. Even though these questions are generic and should be easy to answer I was totally speechless. I'm actually surprised they posted the video on YouTube. Don't forget to give me a thumbs up or a comment, please be gentle or nice with comments! Hahaha!

    BTW.... I have cut my hair since the interview!

    • Upvote 1
  4. Anime/Manga:

    - Bleach

    - Naruto Shippuuden

    - Ao no Exorcist

    - Full Metal Alchemist

    - Inuyasha

    - Pokemon

    - Dragon Ball Z

    And a bunch more....

    For Halloween I had Merimask from DeviantART make me a mask inspired from Ao no Exorcist!

    Side note, check out http://randomc.net/ for a few airing animes. A lot of them I think are good series to watch.

    blue_flame_demon_mask_by_merimask-d4flnzo.jpg

×
×
  • Create New...