Arrow

Changing Code | Peter's Sports League Standings | Forum

Back to the sports standings script page
 
Current User: Guest
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Changing Code

Reply to Post Add a New Topic
UserPost

4:40 pm
June 29, 2008


Martyn

Guest

Hi Peter,

Just checked out you script and it is looking great so far a youth soccer site that I am involved in.

Just a few questions if you have the time :-)

1) Can you point me in the right direction to change the runs for and runs against on the display so it reads as goals for and goals against (GF / GA instead of RF and RA)

2) I can easily change some of the coding so it blends into my site, however, I was just wondering if you have any docs that indicated which code can be changed and which should be left alone.

3) How can I remove the PCT column on the standings page. I dont want it to show.

Thanks in advance

regards

Martyn

1:44 am
June 30, 2008


Peter

Admin

posts 732

Sure:

1) If you only need to change this in the front-end display, it is quite simple. Just open standings.php (or whatever you renamed it to) and search for:

<strong>RF</strong>

and:

<strong>RA</strong>

Then replace the labels as necessary.

2) I don't have specific docs on this, but if you look at the code in standings.php, all of the database retrieval stuff should be left as-is. All display stuff can be changed as much as you want.

The original intent of standings.php was for it to be a framework and thus there's no reason why the different implementations of the script cannot look unique. One day, in the very far future, I hope to make it more of a template system that properly separates content from design.

3) See this topic about making the default sorting method something other than winning percentage. After doing that, if you want to remove that field completely, you can first remove the heading for it:

<td><?php if ($standings_sort != 0) print '<a href="' . $_SERVER['PHP_SELF'] . "?conf=$confid&sort=0\\">"; ?><strong>PCT</strong><?php if ($standings_sort != 0) print '</a>'; ?></td>

Then remove the two entries for it:

<td><?php print $winningpct; ?></td>

To top it off, you can change the default sort order:

default: // Sort by winning percentage
$standings_sort = 0; $sort_order = "winningpct DESC, teamorder DESC";

Reply to Post

Reply to Topic:
Changing Code

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
11 + 5