Arrow

update.php modification | Peter's Sports League Standings | Forum

Back to the sports standings script page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
update.php modification
July 28, 2008
3:29 pm
Jay
Guest

I import my schedule through mysql, so I was wondering how to mod the update.php so that others that are editting the scores do not accidentally change participating teams of games???

I want to eliminate the drop down menu and just echo the select teams that are assigned to the game. I tried to modify it and screwed up both displayed fields, so I have undone all that I modified.

Assistance is greatly appreciated.

July 28, 2008
5:23 pm
Peter
Admin
Forum Posts: 841
Offline

If you don't have too many teams, you can just use the "edit score" permission for those users and use multiple limitations at the team level.

Otherwise, you can hack the admin_files/editscore.php file (you should upgrade to Version 1.2 if you haven't already). At line 203:


// Show all teams if user has full or conference access
if ($is_admin || $is_manage_score || $is_manage_score_conf) {

You can remove the last two conditions to make it so that only administrator users can change teams:


if ($is_admin) {

Make the same change at line 277.

If you really must stick with a Version 1.0 or 1.1 installation, you can look for those similar code snippets in update.php.

July 28, 2008
6:54 pm
Jay
Guest

Unfortunately, I have already integrated an older version into my CMS. Upgrading will cause a severe large step backwards in progression.

Thank you anyways. Maybe someday soon into the future.

July 30, 2008
3:39 pm
Jay
Guest

Where would the older versions be found for download?

July 30, 2008
4:59 pm
Jay
Guest

Thanks Peter!

Your "Crap" is quite useful and I wanted to see the progression. It also helps me learn by dissecting code as well.

Keep up the good work!

July 30, 2008
5:08 pm
Peter
Admin
Forum Posts: 841
Offline

Thanks. To be quite honest, the code itself is far from optimal as it evolved from a time when I was first learning PHP.