PDA

View Full Version : Custom Postbit for Admin


kmfdm_kid2000
08-22-2002, 10:00 PM
First off, if this doesn't belong here, delete, move, ect. I'm new here, so forgive me. Secondly, this is NOT my hack. Credit goes to Zajako 100%. He created this hack while he was a Co-Admin on my board. I just cracked it, that's all.

Step 1:

Create a new profile field edittable only by Admin. Call it something like Postbit#. Then note the ID# for it, you'll need that info later. Best way to find out is Click on Modify custom Profile fields after it's created, right click it, copy shortcut, and paste it somewhere like a blank notepad page. The last 2 numbers will be it's ID#. Open your profile, and in that field, put a 1.

Step 2:

Open your postbit template. Highlight it's contents, and copy. Then create a new template, name that postbit_admin and paste the contents of the standard post bit into your new post bit. Save it. You can come back to this template, and customize it to your liking.

Step 3:

Here's what qualifies this as a hack, I think. Download and open admin/functions.php then find this line:


} else {
eval("\$retval = \"".gettemplate("postbit")."\";");

Directly above it, put this code in:


} else {
If ($post[fieldX] == "1")
eval("\$retval =

\"".gettemplate("postbit_admin")."\";");

Note the X in $post[fieldX] is the ID# of that custom field you made in step 1. You can make multiple templates as well. I.E. I have clans on my board. I've made different templates for each, I usually change the post colors. For instance, there's a clan that's called HGC. I named that template postbit_HGC and in the gettemplate("postbit_admin")." part, I just changed it to gettemplate("postbit_HGC")." However, you need a different number in the custom profile field. Let's say you use 2 to denote someone posting w/ an HGC post bit. The part that says If ($post[fieldX] == "1") gets changed to If ($post[fieldX] == "2")

Just add another line above that, I.E.


} else {
If ($post[fieldX] == "2")
eval("\$retval =

\"".gettemplate("postbit_HGC")."\";");

And you can add as many as you have templates for.

I have 8 different templates on my site. Mind you, every time I make a post bit change, I must apply it to every postbit template. You can customize the different templates as you see fit. Here's some screen shots:

http://gamequest2.netfirms.com/custompostbit.jpg

Note my highly customized postbit, that's not even a sig, it's HTML built right into the postbit's HTML coding itself

http://gamequest2.netfirms.com/standardpostbit.jpg

This is the standard post bit. Play around with the code, and see if you can customize things to your liking. There are 5 places you must look for to change post color, just look for
<td bgcolor="$post[backcolor]" and hard edit it to your liking.

Enjoy, and please, remember this was NOT my hack, this was Zajako's hack. If I did something wrong, please tell me. I'll try to help as much as I can, but you'll have to do your own HTML customization...

EDIT: For a full Demo, visit http://www.gqforums.com
Threads aren't viewable if you're not logged in, so here's Log in info:

Username: Visitor Password: gamequest

GuruXL
08-22-2002, 11:52 PM
umm..this hack is nice, but...i still think it needs something more...but ok...thanks anywho

Storm
08-23-2002, 12:13 AM
Nice hack, I have this one! :D

kmfdm_kid2000
08-23-2002, 12:19 AM
EDIT:

I'm no longer supporting RPG Palace and it's corrupt Administration techniques...

Dyntheos
08-23-2002, 01:58 AM
your kidding me right?

There no customization on those forums apart from a color shift. The buttons are even the same. :/

Neo
08-23-2002, 06:13 AM
I am working on a more advanced version of this oO;;;

g-force2k2
08-23-2002, 06:20 AM
Neo i remember your user style hack ;) are you going to be doing an advance version along those lines :)

btw about the hack its really just customization no?

g-force2k2

kmfdm_kid2000
08-23-2002, 08:31 AM
Originally posted by g-force2k2
btw about the hack its really just customization no?

g-force2k2

Basically it is that exactly. i think if you've got all of your users on a standard post bit, it's nice to stand out as an Admin. And plenty of boards have clans, so I think it'd be nice to have certain clan postbits with logos, images, ect. built right in.

As far as my own template, I've removed most of the Variables, and hard coded almost everything in directly. Username, title, avatar, signature, everything was all removed and hard coded in directly into the template. I think if you like to code, it's a lot more fun to have an entire template to customize, rather than your standard ACP profile. There's almost limitless possibilities, as per the definition of customization.

Neo, by all means, if you want to improve on this, that'd be great, and appreciated. I'd be eager to see what you can add to this :D

This hack isn't anything profoundly functional, it's very much a cosmetic hack. The only thing really qualifying it as a "Hack" is a line of PHP, but I still liked it enough to share it. It's more of a Template Mod/ Mini-Hack. I'm still very much a newbie when it comes to coding, but I learn fast, and I hope to someday bring new functionality to my community, as well as others out there...

Xenon
08-23-2002, 10:03 AM
Originally posted by Neo
I am working on a more advanced version of this oO;;;

Not only you ;)

ZiRu$
08-23-2002, 02:09 PM
thanks....but not useful to me

DrkFusion
08-23-2002, 03:35 PM
Good hack..I don't know why admins would want a custom post bit..its too much work, and well I wouldn't see a point to it.

If I ever find a use for it, I will install it :)
*Downloads*

Brad
08-23-2002, 06:53 PM
Originally posted by DrkFusion
Good hack..I don't know why admins would want a custom post bit..its too much work, and well I wouldn't see a point to it.

If I ever find a use for it, I will install it :)
*Downloads*

Well you can hide stuff like the ip logged to normal users. however i wont be installing it. nice idea tho.

zajako
08-24-2002, 06:21 AM
i threw this hack together in seconds and that is why i did not release it. if it were not for the fact it is of no use for me anymroe i would make a clan hack out of it by makign it so that when you join a clan it changes the postbit automaticaly and you can register a clan by filling out a form and makeing a postbit for it... there are many possibilities for this hack, but do to me nolonger helping at gq and my board being a peacefule non claned board its of no use so i won't bother with it.

kmfdm_kid2000
08-24-2002, 10:42 AM
It IS a bit of extra work, since I have 8 different post bits, but for me it's worth it, my members like having different colored post bits for their groups, and I like being able to have mine look totally different than the rest. I also lock my Co-Admins out of editting templates, and Storm wrote me a custom hack that allows my Co-Admin to edit his custom template from the Mod CP, so that's 1 less post bit I have to worry about...

Neo
08-24-2002, 02:46 PM
Originally posted by Xenon


Not only you ;)
*yawns* I am not releasing mine though since hence I dont feel like making a hack file for it oO ... and its way to much code... :ninja:

SpeedStreet
08-27-2002, 06:42 PM
This shouldn't even be considered a hack.

If you are modifying multiple postbits, then it is a template change, not a hack.

I could understand a few slight modifications to an admin postbit, but you have gone WAY overboard. I got a headache just from reading your signature!!!

Remember, message boards are for people to have a community in, not for admins and moderators to be the popular crowd. Making yourself look so much more 1337 than everyone else is not really....aww forget it, nobody listens anyways. I just hope that board isn't on my host :)

Link14716
08-28-2002, 12:15 AM
It is a hack. It requires a file edit :)

mx3
12-21-2002, 07:36 PM
I can see how KKid liked this one, and i kinda do to when i go to his forums...I might install later.

sonic3d
02-12-2003, 06:53 PM
well it doesn;t work for me.

l8er
sonic

Courage
08-22-2004, 08:47 AM
I've created a new custom field editable by admins, but I want to put the info for anyone in the postbit.

How can this be done ?