thanks for the tips guys!

I'm just a newb php guy, but i have been playing around a bit.

http://www.freepgs.com/stewy/scripts/gallery

edit: fixed the link! oops tongue

does such a function exist?

sorry, this might be the most stupid thing ever written in this forum...

hey,

i noticed the site (and my forum) is down, any idea on when it'll be back up.

i know this isn't the proper place to post but it's hard to post on a board that isn't there.

4

(2 replies, posted in Programming)

I would like to know how to keep track of how many times a file has been downloaded...

More specifically (i guess this is the same thing really) how many times a picture has been viewed.


Thanks in advance.

I just answered my own question, it wasn't a problem with the alignment tag at all, it was a problem with this:

$cell_width = "100/$cols" . '%';

should have been

$cell_width = 100/$cols . '%';

I have a small photo gallery script that i wrote. For some reason IE has chosen to ignore my align="center" on the index page. The page works fine in firefox, you can see the results here

Anyone know why it would be doing this? What about a workaround?

I have a webpage of links that i want displayed under different headings, depending on which array they're in. I have 4 different arrays...

I had identical code for all of these so i thought i would write a function....
This is what I came up with:

function listlinks ($array)
    { 
        $counter = '1';
    
        foreach ($array as $key => $value) 
            {
                if($counter%2){ echo '<tr class="alt"><td>'; }else{ echo '<tr><td>'; }
                echo " » $value</a></td></tr>";
                $counter++;
            }
    }

It keeps telling me that I have an invalid arguement supplied for foreach.

Can anyone help?

I really like this idea. Good Stuff.

9

(137 replies, posted in News)

hey,

just wanted to say that the new site looks great...
punbb 1.2 looks fantastic as well.

congrats!

10

(11 replies, posted in General discussion)

punbb = great

phpbb =  not so great

11

(6 replies, posted in General discussion)

That is hilarious!

12

(4 replies, posted in Programming)

holy cow, this is crazy!

well, the code works fine actually, i just figured that it could be written in a clearer or better way, since this is the first thing i've ever done in php... or at least the most involved.

you can see the script in action here

I've saved the code as textfiles:
config.txt is here and
index.txt is here

The indentation is a bit off, but the code's there.

If anyone would like to comment, that would be great.

13

(4 replies, posted in Programming)

weird, everytime i try and post the rest of the code it leads me to a page that says precondition failed

What does this mean?

14

(4 replies, posted in Programming)

Hey,
This is the first script i've ever wrote that has functionality, it's pretty simple, I'm just posting it here so you guys can give me some feedback, i know i'm probably not doing things as efficiently as possibly. Anyways, here's the code if you'd like to critisize or off any helpful hints.

This is config.php

<?php

$title             = "Stewy's Pictures";             
$gallery_name    = "Scenery";

$scriptname     = $_SERVER["PHP_SELF"];        // Do not edit this.

$pic_suffix        = "pic";            // 

// All these are relative to the base directory
$thumb_dir         = "small";            // Directory where your thumbnails are stored
$regular_dir     = "medium";            // Directory where the regular size pics will be stored
$fullsize_dir     = "large";            // Directory where fullsize pics are stored.

$cols                 = '5';            // The number of columns you want
$number_of_pictures = '15';            // The number of pictures in your album
$picture_alignment     = 'center';     // pictures should be named in the following format: pic##.jpg, EX: pic01.jpg, pic02.jpg... etc.
$thumbwidth         = '100';        // The width of your thumbnails, this should ideally match the actually thumbnail width ~ 100px.
$preview_cell_width = '175';         // The width of the previous and next panes
$width                 = '410';         // The width of the reg size pictures.

// Array of comments, these will be displayed under your pictures, 
// 01 will match picture 01 and so on, if you need to add more
// add them using the same pattern.
$comments = array(
"01"    => "Argentia, NF.",
"02"    => "The Falls at Flatrock, NF.",
"03"    => "The Ocean at Flatrock, NF.",
"04"    => "Logy Bay, NF.",
"05"     => "Placentia, NF.",
"06"    => "Signal Hill, NF.",
"07"    => "Horseshoe Canyon, AB.",
"08"    => "Hot Air Balloon",
"09"    => "Lake Louise, AB. in winter",
"10"     => "Lake Louise, AB. in summer",
"11"    => "Moraine Lake, AB. in summer",
"12"    => "Moraine Lake, AB. in winter",
"13"    => "Fort Amherst, St. John's, NF.",
"14"    => "St. John's Harbour 1st View",
"15"    => "St. John's Harbour 2nd View",
);

$next     = $picture + 1;             // Setting up our next value (Do not edit)
$prev     = $picture - 1;             // Setting up previous value (Do not edit)
$next     = sprintf("%02d",$next);     // This line adds a leading zero to $next. (Do not edit)
$prev     = sprintf("%02d",$prev);     // This line adds a leading zero to $prev. (Do not edit)

?>

15

(12 replies, posted in General discussion)

all i know is that i tried to remove some of the links.... didn't need a gallery or a wiki, but i looked thru the admin area and didn't find anything that looked obvious.... as to how i could remove it...

16

(12 replies, posted in General discussion)

it just seems that every cms i try is a huge bloated beast, with a million features i'll never need or want.

I've tried blog:cms but it came with a million plugins preinstalled, it became a headache, i just deleted it...

is nucleus better than blog:cms? Isn't bCMS based on nucleus?

17

(12 replies, posted in General discussion)

i don't think a good cms exists.

18

(4 replies, posted in General discussion)

damn, how'd ya slip that in there so fast.

and a better response too, it's true, i'm owned.

19

(4 replies, posted in General discussion)

like my forum?

click here

i'm at school right now, and i can't remember the specifics, i remember editing the tables in main.tpl.... I can find out for you when i get back home in a few hours, cheers.

wow, i couldn't have hoped for a better response to that post. sweet!

This is a great idea, sheer brilliance!

that would be suitable for setting up punbb?

if i had to set up an inline ad it would be fine, but i can't handle pop ups.

if you've got any ideas let me know thanks!

I installed this mod today, went very smoothly.

Just wanted to come back and say how much i like it.

Thanks!

perhaps this really isn't a punbb question, but after i accidentally deleted my forum with a little over 2500 posts, i'd like to know for future reference.

Thanks.

yes sorry about that. shortly after i made this post i accidentally dropped my database and destroyed my forum. Lost all my posts, everything, I've since managed to edit the template file to make the forum display the way i want.

I did have phpbb installed at one time, you must have clicked when i was frantically trying to reinstall punbb.

Thanks for having a look.

Hey,

I have a forum located here: http://www.freepgs.com/forum

I have edited the main.tpl file to lock the table with at 750.
If you click on the section of the board titled "the mfo" you'll notice that the board actually gets wider than this, which doesn't happen when either of the other forums are clicked on.

I was wondering if you could shed any light on why the board is acting this way.

Thanks in advance.