Results 1 to 3 of 3
  1. #1
    emoisback
    emoisback is offline
    Full member
    Join Date
    2011 Dec
    Location
    Indonesia there i'm
    Posts
    508
    Thanks Thanks Given 
    83
    Thanks Thanks Received 
    244
    Thanked in
    68 Posts
    Rep Power
    13

    [VBulletin Plugin] Post Per Day/Week/Month

    Okey i have make this plugin for this forum.

    sorry i late and i have to share this for other people who want to learn about php server side scripting.
    This Plugin will show the avg user's post at day or week or month.

    Plugin Name : Post Per Week

    - First u have login into vbulletin admin control panel go to Plugins & Products -> Add new plugin


    - The u will see form like below




    I will explain what is that :

    Product : Name of Plugin Product

    Hook location : where the plugin code will be execute.

    Title : Description what is the plugin for.

    Execution Order : index of plugin will be execute...if you have another plugin then you put 1 for this plugin, so this plugin will be execute first

    Plugin Code : Here is the code of plugin will be execute.

    Plugin is Active : togle to active the plugin.

    Okey Now Just fill the form like the image, for code put this code to the plugin code

    PHP Code:

    $jointime 
    = (TIMENOW $vbulletin->userinfo['joindate']) / 2419200//its for a month if you can change to 604800 seconds for 1 week, 84600 for 1 day.

    if ($jointime 1// if they join time is less then 1 day
    {

        
    $postspermonth vb_number_format($vbulletin->userinfo['posts']); put they current post
    }
    else
    {
        
    $postspermonth vb_number_format($vbulletin->userinfo['posts'] / $jointime2); // more than 1 day..
    }

    vB_Template::preRegister('memberinfo_block_statistics',array('postspermonth' => $postspermonth)); // puss variable into template hook 
    Then Click Save and Reload.

    For add plugin to you vbulletin is done. but we have edit our template to use the plugin.


    Editing Template for Plugin

    - First Go To Styles & Templates -> Style Manager



    - At a combo box chose the Edit Template

    - Then find the template at Member Info Template.. here we used memberinfo_block_statistics inside Member Info Template to hook the plugin..double click memberinfo_block_statistics.

    Find The Place that u want to put it..

    for example ..

    Find This :

    PHP Code:
    <dl class="blockrow stats">
        <
    dt>{vb:rawphrase posts_per_day}</dt>
        <
    dd> {vb:raw prepared.postsperday}</dd>
    </
    dl
    Add Below :

    PHP Code:
    <dl class="blockrow stats">
        <
    dt>{vb:rawphrase posts_per_month}</dt>
        <
    dd> {vb:raw postspermonth} </dd>
    </
    dl
    then save and reload.

    Then Go To Languages & Phrases -> Phrase Manager

    Click Add New Phrase

    At Varname put : posts_per_month
    at Text put : Post Per Month

    Then save it..


    Its done just view your user profile or other user profile.. you will see the post per month there..

    Hope this tutorial is Useful..

    and yes i create this plugin just by my self. if you want to get explain about the code just ask here..
    Learn from PGC for Share on PGC..


    For another Stuff i have make try to find it [Please, register to view links]
    If i have help you, please thanks and respect ..

  2. The Following User Says Thank You to emoisback For This Useful Post:


  3. #2
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,222
    Thanks Thanks Given 
    211
    Thanks Thanks Received 
    2,230
    Thanked in
    292 Posts
    Rep Power
    10
    Wonderful tut + useful content.

    Reputation for good stuff
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

  4. #3
    emoisback
    emoisback is offline
    Full member
    Join Date
    2011 Dec
    Location
    Indonesia there i'm
    Posts
    508
    Thanks Thanks Given 
    83
    Thanks Thanks Received 
    244
    Thanked in
    68 Posts
    Rep Power
    13
    Hope got some one interisting with programiing XD.
    Learn from PGC for Share on PGC..


    For another Stuff i have make try to find it [Please, register to view links]
    If i have help you, please thanks and respect ..

Similar Threads

  1. AIKA GB ending this month
    By gm3x in forum Games Lounge
    Replies: 4
    Last Post: 2011-10-10, 02:57 PM
  2. post forum rules in english pls
    By poge in forum General Talk
    Replies: 3
    Last Post: 2010-10-30, 05:34 AM
  3. [Guide]Multi-Botting. Make 30m/week
    By mhongski in forum Trash Bin
    Replies: 0
    Last Post: 2010-10-29, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •