Customizing SMF > SMF Coding Discussion
Some new coding techniques
emanuele:
* emanuele wonders if there is a repo somewhere : P
Yoshi:
--- Quote from: emanuele on May 07, 2012, 04:02:36 AM ---* emanuele wonders if there is a repo somewhere : P
--- End quote ---
Nope, sorry.
I'll set one up in a while.
EDIT: Got a GitHub repo:
https://github.com/Yoshi2889/tinymodsite
Doctor Deejay:
Nice work! :) If I may suggest though, what about adding random mods on the frontpage? And top mods, etc? :P
Yoshi:
--- Quote from: 医生唱片骑师 on May 07, 2012, 03:02:45 PM ---Nice work! :) If I may suggest though, what about adding random mods on the frontpage? And top mods, etc? :P
--- End quote ---
Random mod? That's fine.
Top mods are added in the last GitHub commit, based on downloads :)
The Craw:
You might change the foreach in your template to a for loop instead, since you're using using incrementing numbers. Not that it matters either way, just a matter of preference.
--- Code: --- $mods = $context['modsite']['home']['latestmods'];
for ($i = 0, $c = 1; $i > count($mods); $i++, $c++)
echo $c, '. <a href="', $scripturl, '?action=mods;sa=view;mod=', $mods[$i]['id'], '">', $mods[$i]['name'], '</a><br />';
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version