Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Prev Previous Post   Next Post Next
  #25  
Old 11-02-2001, 06:37 AM
Palmer ofShinra's Avatar
Palmer ofShinra Palmer ofShinra is offline
 
Join Date: Oct 2001
Location: Vancouver, BC, Canada
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I learned PHP in a haphzard way... and am still learning.

It started when our board got hacked. Social engineered, actually.
And he took away all our admin's access.

All of our16 staff were admins, mainly because the Mod CP didn't have all the functions we needed.

And having 16 admins is a real security hole.

So... I took it upon myself to make things work better.

The key was to give them user profile editing but with limits...

So I figured.... this can't be too hard.
I don't know PHP... but I had taken 1 semester of intro Turbo Pascal back in HS 6 years back... so reading code shouldn't be THAT hard.
Syntax is syntax, right?
I could read it and figure out what did what...

Then I'd just copy/paste the edit user function from the admin CP into the Mod CP and edit out al the bits I don't want to allow.

Well... it was a bit harder than that.

But I read so much code it started to stick.

So... that post was a success. And the other staff were happy.

For about 5 minutes.

Then they needed feature-x from the admin CP... so I had to copy/paste the code for that over.
Then feature-y. And z.

Finally... there came a point where the Mod CP needed strictly limited usergroup editing.

This required more than copy/paste.

So I read the code... and learned the commands to send the query, as well as the right query.

I tried it... and it worked!

Now... I figured I had this usergroup part down...

So my next project was... figuring out how custom titles and avatars were controlled (requirements for use) and to change them to match some of our usergroups.

And that worked!

Now I needed to change everyone over ot the new usergroups and change their title status.... so ripping yet another example out of the vb source, I wrote my first standalone script... all it did was go through the DB, find everyone who has customtitle==1 and display them, with links to edit their profiles.

Now... i had this coding thing down...

So, using my trusty manual (http://www.php.net/manual/en) I set off... to write my own complex script which would automate many of our tedious tasks.

And I did it... in only 3 days.

Admittedly, the core was based around code snippets from the vb... but you know what they say about reinventing the wheel.

But over 95% of the code, and 100% of the concept, was original.

Thus was born my Automated Store.

Needless to say... both the members, and more importantly, the other staff, were floored and delighted by it.

And then came further tweaks.

I'm working on the simple, unified Points hack add-on now, which grew out of this.

Now the staff keep trying to find new things they want me to do for them.

Earlier today, I set it up so that people can have bbcode in their titles...

Basically... I learned by reading the code and working with it hands-on and using the manual as a reference to figure out how to do a few things, and how some things worked.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03799 seconds
  • Memory Usage 3,014KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (27)post_thanks_box
  • (27)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (27)post_thanks_postbit_info
  • (27)postbit
  • (27)postbit_onlinestatus
  • (27)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete