Log in

View Full Version : PHP Help


FRANK(WGH)
20-02-2006, 18:29
Well this seemed to work in years past so here I am again to ask the community for some php help.
I'm working on an image gallery called <a href="http://www.solitude.dk/gallerythingie/">"Gallery Thingie"</a> which is actually a very good php gallery that relies on flat-file databases for its information. The problem i'm having is that i need to limit the amount of thumbnails that appear on a single page. I asked the creator of the script have gotten no good advice accept to look for loop tutorials.
Here's what i have have:
<?php displayList($phpfile, "thumbnail");?>
I'm supposed to hack this line of code to do what I want.

Any ideas anyone????

rappo
20-02-2006, 22:55
I downloaded the Gallery Thingie file and noticed that in the gt-pub.php there are several for loops.

Example:

function displayList($phpfile, $linktitle = "number") {
global $name, $id, $category, $cat, $title, $path;
for ($i=0;$i<count($name);$i++) {

You can replace the count with the amount that you want to be displayed, but that would mean that you have to implement a page function...

FRANK(WGH)
20-02-2006, 23:10
I downloaded the Gallery Thingie file and noticed that in the gt-pub.php there are several for loops.

Example:

function displayList($phpfile, $linktitle = "number") {
global $name, $id, $category, $cat, $title, $path;
for ($i=0;$i<count($name);$i++) {

You can replace the count with the amount that you want to be displayed, but that would mean that you have to implement a page function...

would you or anyone else be able to help me do something like this???

Knippschild
22-02-2006, 21:49
Coming from a web-developer, I suggest that you start using mySQL or some kind of database structure. Databases ensure greater stability, speeds, and security than flat-file systems offer. I know this does not exactly help your situation, but just a word of advice.

:)

Chriszuma
22-02-2006, 21:51
An indespensible tool for PHP development is http://www.php.net. You can look up any function in the search box for its syntax, or browse through functions by category.

Knippschild
22-02-2006, 22:06
An indespensible tool for PHP development is http://www.php.net. You can look up any function in the search box for its syntax, or browse through functions by category.

Quite so. PHP dot net will probably become your new bible, I often use it to look up the syntax of confusing functions.. also, I always forget the parameter values for date(); :-p