Jump to content

Search the Community

Showing results for tags 'counter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Site Information
    • Information
    • Staff Contact Center
    • Ask us
    • Introduce Yourself
  • Spotlight RPG Challenge
  • Roleplay Conversations
    • Roleplay Chat
    • Roleplay Management
    • Brainstorming & Ideas
    • Member Confessions
    • Staff Confessions
  • Assistance
    • Site Reviews
    • Coding Help & Requests
    • Graphics Requests
  • Personal RP Requests
  • Site Requests
  • Wanted
  • Creation & Development
  • Learn HTML/CSS's General conversation
  • Learn HTML/CSS's Ask for help
  • Learn HTML/CSS's Quick Tips
  • Modern Fantasy Circle's Topics
  • Historical RPs's Topics
  • Book Club's Topics
  • Make My Life Make Sense's Topics
  • Dragonriders of Pern Boards's Topics
  • Jcink Hosted's Topics
  • Graphics Showcase & Discussion's Topics
  • MyBB Staff People's Topics
  • SMF Staff People's Topics
  • Monster Fans's Topics
  • Discord's Topics
  • Gamers's Topics
  • Pet People's Topics
  • Site Design's Topics
  • Cooking's Topics
  • Cooking's Recipes
  • Star Trek's Topics
  • Star Wars's Topics
  • Game of Thrones's Topics
  • Cosplay's Topics
  • The Writing Pad's Discussion
  • The Writing Pad's Writing Exhibit
  • MTV's THE REAL WORLD!'s Non-RP Chat & Discussion
  • MTV's THE REAL WORLD!'s RL Storytime
  • MTV's THE REAL WORLD!'s The Hot Seat
  • MTV's THE REAL WORLD!'s Forum Games
  • NaNoWriMo's Information
  • NaNoWriMo's Previous NaNoWriMo Years
  • NaNoWriMo's Current NaNoWriMo
  • Harry Potter's Topics
  • Dr Who's Topics
  • Supernatural (The TV Show)'s Topics
  • Firefly's Topics
  • The Bug Enthusiast's Bugs, mice, and all things talk
  • Vesta Software's Feedback and Discussion
  • Vesta Software's Development
  • Vesta Software's Feature Requests
  • Vesta Software's Questions
  • Vesta Software's Archives
  • Movie Club's Test
  • Movie Club's Post-Movie
  • Movie Club's Pre-Movie
  • Movie Club's Topics
  • NOVA's Topics
  • The Art Studio's Topics
  • Avatar the Last Airbender's Topics
  • Cryptozoology's Topics
  • World Building's Map Building
  • World Building's Topics
  • World Building's General Discussions
  • PHPBB Staff people's Topics
  • Xenforo Staff People's Topics
  • Cyberpunk and Transhumanism's Topics
  • Dragon Age's Companions
  • Dragon Age's Ships
  • Dragon Age's Protagonist Corner

Categories

  • The Initiative Services and Features
  • Forum Building and Management
  • Writing Materials
  • Being a Member
  • Software
    • IPS Character Manager
  • Coding
  • Graphics

Categories

  • Roleplay Search
  • Writing Partner Search
  • Character Home Search

Categories

  • General Update
  • Announcement
  • Articles
  • Feedback
  • Tomfoolery

Categories

  • Active Challenges
  • Archived Challenges

Categories

  • Application Templates
  • Plotters
  • Post Templates
  • Staff Templates
  • Thread Trackers
  • Other
  • Pending Challenge Entries
  • Past Challenge Entries

Categories

  • Communications
  • Contributions
  • Operations

Categories

  • Jcink Themes
  • ProBoards/FreeForums Themes
  • MyBB Themes
  • IPS Themes
  • SMF Themes
  • phpBB Themes
  • Other Themes
  • Modifications
  • Make My Life Make Sense's Files
  • Dragonriders of Pern Boards's Files
  • PHPBB Staff people's Files
  • Xenforo Staff People's Files
  • Cyberpunk and Transhumanism's Files

Blogs

  • Morrigan's Madness
  • Staff Blog
  • Just a girl and her stuff....
  • Loose Ends
  • A pirate captain's log
  • Somnia News
  • Ghost's One-Shots
  • Bits & Bones.
  • Amelia's Blog
  • Mobydoll's Blog
  • a medieval world
  • Everything Super
  • Ask GR - advice for RPers
  • Icewolf's Musings
  • Tales From The Shoebox
  • Thoughts on Roleplay
  • Salt Box
  • The Salt Mine
  • Little bit of Gothic
  • The Totally Epic and True Tales of Kit the Human
  • Obvious Blog Is Obvious
  • Fountain of Thoughts
  • Please Turn The Device Off and Back On
  • gbwhatsapp apk
  • The Veritas
  • That Necromancer Life
  • Make My Life Make Sense's Blog
  • Dragonriders of Pern Boards's Blog
  • Cryptozoology's Blog
  • Cyberpunk and Transhumanism's Blog

Calendars

  • Community Calendar
  • Character Birthdays
  • Book Club's Events
  • Make My Life Make Sense's Events
  • Dragonriders of Pern Boards's Events
  • NaNoWriMo's Virtual Write Ins
  • Cryptozoology's Events
  • Xenforo Staff People's Events
  • Cyberpunk and Transhumanism's Events

Product Groups

  • Converted Subscriptions
  • Hosting
  • Advertising

Collections

  • Settings
  • Staff
  • Notifications
  • Forums
  • Submitting to the Directory
  • RPG Directory
  • Playby Directory
  • Searching for Roleplay
  • Guides
  • Challenges
  • Character Wanted Ads
  • Affiliate & Staff search

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Twitter


Skype


NaNo House


Game of Thrones House


Bending Nation

Found 1 result

  1. Auto Counting Additional Statistics Tutorial Created By: isoldehn Tutorial Permissions: Please do not re-post this tutorial else where, instead link someone to this thread. - Additionally, you are NOT required to credit me if you use these codes on your board BUT I do wish for you to share this with those that ask about it if they ever do (share the knowledge, be kind). Tutorial Needs: Overall, the ability to copy and paste. - Knowledge Of MyBB Templates - FTP/File Access To Web Space - Knowledge On Editing Core Files/Creating MyBB Pages OR Usage of PHP In Templates / Complex Templates Plugin * Using the above linked plugin allows you to inject PHP straight into templates without editing core files or creating new pages in MyBB. Lets begin to process... There are MANY capabilities within this guide. Therefor I am expecting you to already know how to: Insert scripts into core files (where you need them). OR Create a new page specifically for all the scripting you are about to do. OR Make use of the plugin linked above for inputting the script directly into a template. I will not be explaining how to do any of the above but instead giving you strict scripts for purpose. If there are any questions regarding the above information you can quickly find information via MyBBs support forum where lots of documentation can be found on the above information. MyBB stores all database information via MySQL. We will be pulling all the information from said storage! Alright I'm ready to see the base code for counting accounts in a usergroup. This is the very base, so look at it in all its basic poop glory. $countquery = $db->fetch_field( $db->query(" SELECT COUNT(*) as countquery FROM ".TABLE_PREFIX."users WHERE ".TABLE_PREFIX."users.usergroup IN (#) "), 'countquery'); $countquery = Your variable, this will be the input for templates when finished. You might stick this in Index Templates -> index or you may be putting this in a specific template for a new page depending on where/how you choose to create the script. SELECT COUNT(*) as countquery = You are defining what this is counting. FROM ".TABLE_PREFIX."users = We are now grabbing the users table and storing its information. WHERE ".TABLE_PREFIX."users.usergroup IN (#) = Defining the usergroup row as well as the groups GID number. If using multiple groups in one query it would be separated by commas (#, #, #). 'countquery' = We're ending our defined counting. I'm actually looking to count profile field inputs per groups instead. If you are looking to count specific profile field inputs you would do so with this base instead. $countquery = $db->fetch_field( $db->query(" SELECT COUNT(*) AS countquery FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."userfields uf ON (u.uid=uf.ufid) WHERE u.usergroup IN (#) AND uf.fid#='OPTION' "), 'countquery'); Besides what is explained previously, there are a few new additions here. FROM ".TABLE_PREFIX."users u = Usergroup is in the users table, we need to add it to the FROM section so we can also select fields next. LEFT JOIN ".TABLE_PREFIX."userfields uf = Joining the user fields with the users table. ON (u.uid=uf.ufid) = I'm not really sure but my browsing of the internet got me this bit that makes it work. WHERE u.usergroup IN (#) AND uf.fid#='OPTION' = New approach to usergroup specification while also requiring that it matches profile field option. uf.fid3='Male' is an example. I'm rather looking to count posts from a board. Maybe you have specific boards for IC threads and would prefer your statistics to show only threads/posts in character. Here is a step towards achieving that. $countquery = $db->fetch_field( $db->query(" SELECT COUNT(*) as countquery FROM ".TABLE_PREFIX."posts WHERE fid IN (#) "), 'countquery' ); FROM ".TABLE_PREFIX."posts = This is where you will gain the counts of posts. If you're looking for threads do threads instead. WHERE fid IN (#) = The boards FID number. How about counting a specific groups post totals. Maybe your groups battle for the largest post/thread amounts? See whom has the highest! $counterquery = $db->query(" SELECT COUNT(*) AS counterquery FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."posts ON (u.uid=".TABLE_PREFIX."posts.uid) WHERE u.usergroup IN (#) "); $counterquery = The variable for the counter script. LEFT JOIN ".TABLE_PREFIX."posts = You're choosing posts, if you would rather count threads replace posts with threads. ON (u.uid=".TABLE_PREFIX."posts.uid) = Combing users to their posts, again if you would rather count threads replace posts with threads. TIP, if you would like to count posts in say the last 30 days time you would change the WHERE clause to something along these lines: WHERE dateline > ".TIME_NOW." - 2592000 AND u.usergroup IN (#) --- That is all I have for this guide. This guide was meant to give a push in the right direction for those willing to learn but it is not completely simplified. If questions arise you are free to create a support thread in the Coding Help & Requests board. If you become creative you can do so much more than just the basics of what I have offered here. Dig deep into the internet, search boards and places for more kicks in the right direction. Auto counting can be as simple as you want it to be if you piece things together correctly.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.