Hi there.
First off, I’m not a developer, i don’t know php. I know how to hunt and peck, and through searching websites I figure out how to get things done. but i absolutely don’t know how to code.
I’ve cobbled up some code to take a directory and display its contents. There’s a short backstory here.
Recently I migrated my forum from vbulletin to Xenforo (after being a vb customer since 2000) the migration didn’t pick up the smilies.
over 8 years this forum was up we had a ton of smilies. WAY too many. so i asked the admins to add a few back in. but i wawnted to show them all the smilies that were on the other site. So i came up with this.
this works fine. puts the image out for display as an anchor, puts the path in the text box so they can copy the source location so they can add it to a new smiley on the new forum.
everything is great, except, there are over 400 smilies in this directory, and as you can imagine this list gets very long.
I’d like to do one of two things.
- change this to a table. but really that’s not the right answer, it’ll still be way too long
- paginate these results. maybe to show 50 at a time, or even 100.
whatever the case, i need some help on how to display these results in a better, more efficient manner.
can someone give me some ideas?
here is my code
[php]<?php
$dirname = “smilies/”;
$images = glob($dirname."*");
foreach($images as $image) {
echo ’
’;}
?>[/php]