Jump to content

hey_im_chris

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hey_im_chris's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey everyone ^_^ I'm working on a design for something at the moment, and I'm hoping some simple PHP can make things a bit easier for me. What I want to achieve is when a user clicks on a link to one of the galleries, a new page appears and depending on the name of the link, the corresponding album.php and title.gif appear on it's index.php. I imagine this can be achieved with a template. For example: [pre]1. User clicks on a link called abc.php. 2. A new page appears that has the main layout/design on it. 3. abc/imgs/album.php loads into an iframe, and abc/title.gif loads at the top of the page.[/pre] (all links are relative to the main directory) I could do this manually, but I have 79 pages to create and growing. Semi-automation would be superb! Any advice? :)
  2. Thanks redarrow! How am I suppossed to handle this? I tried the obvious, 'save as index.php and upload it into the images directory' but that returned nothing. Could you explain to me what I/we're suppossed to do? Hehe :)
  3. I'm interested in this, too. I don't care for fancy scripts that do a whole bunch of other stuff I don't need, just a nice little script that makes thumbs of the files in a particular directory plus easy to edit settings like thumbnail size, style and number of thumbnails per line. :D
  4. That's just an insult to my intelligence! ;) My directories are set up perfectly fine, otherwise they wouldn't work when I view the page directly. Do you think there's a chance that it's looking for the filepath ./album.php/imgs/thumbs? It's a bit daft, but I'm running out of ideas! ::)
  5. Lines 14, 16 and 49 all refer to '$myDirectory' and use it in [i]$myDirectory = opendir("imgs/thumbs");[/i], [i]while ($file = readdir($myDirectory))[/i] and [i]closedir($myDirectory);[/i] respectively. If you'd like to take a look, I'll attach album.php in a moment! :) [attachment deleted by admin]
  6. Well I thought that it might have been a problem with the directory, but it isn't because the page, album.php works fine if I view it directly, but it doesn't work if I call for it in the include. The include basically says [i]$set .= "/album.php";[/i] with the link set as [i]index.php?set=directory[/i] ,so it calls ./directory/album.php, which should work. I'm just confused as to why it doesn't.
  7. Hi, I've come up with a good plan to work around my last includes problem, and it's flawless... with everything but the page I want to call. The page I'm trying to include is a php script for an image gallery I pulled off the net about a year ago. If anyone can help and they'd like to take a look at it, you're very welcome. Anyway... When I call that particular page, I get 3 warning errors: [quote]Warning: opendir(imgs/thumbs): failed to open dir: No such file or directory in /home/.../album.php on line 14 Warning: readdir(): supplied argument is not a valid Directory resource in /home/.../album.php on line 16 Warning: closedir(): supplied argument is not a valid Directory resource in /home/.../album.php on line 49[/quote] Any ideas what this means and how to resolve this?
  8. I'd prefer to have it so that plain text pages will load into the main page (index.php), which holds the quite image-intensive layout design. Is that what you mean? :-\;)
  9. Thanks for that! It seems quite straight-forward, actually. I'm a total php noob because I only learn what I need to when I need to use it. Tonight I'm learning about arrays! ;D EDIT: Okay, first of all, I'm having a bit of bother about how to load a page called 'gallery.php' as the default page that gets loaded at the start. Basically, what I want to achieve is: 1. index.php loads a text page with links to other pages called 'gallery.php'. 2. gallery.php has many links to pages in many other directories, which will load into index.php. I could easily achieve this (as I have done already) with a simple iframe, but I don't want the inherent scrollbar and how I got past that in the past was to use a script that set the iframe dimensions to the exact dimension of the various pages it will load. BUT, that only worked in IE. This time, it is very important to me that the site works in Mozilla Firefox and Opera. Thanks for your help so far, but if anyone can offer any advice about how to go about achieving my plan, I would be very damn grateful! :D
  10. I've never tried that before. How does it work? :)
  11. Hey everyone, Just a quick question I'd like to resolve tonight... I have an index page that holds the php include script, and pages are called into that. The first page it calls has several links on it, which need to go to other pages in other directories, BUT, here's where the problem is: I don't know how to link to a page in another directory, since simply trying [i]index.php?x=dir1/page[/i] tries loading index.php?x=page and that's it. Is there a way to write a filepath that fixes this problem? If it helps, a basic look at my directory is: Main Directory   - dir1       - page.php   - index.php I hope I've explained my problem sufficiently enough that somebody can explain to me what I need to do! Thanks in advance! :) Chris
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.