Home
Home

Directory
Directory

Articles
Internet News
Security News
Ecommerce News
Domain News

Site Tools
Site Speed Test
Keyword Research
Resolve Hostname
DNS Tools
Register Domains
Affiliate Programs
Open Source

Shopping Carts
Cart Reviews
SSL Certificates

Enter your email address to subscribe to our updates:

Delivered by FeedBurner


Venue Charts
Channel Traffic Rankings
OAI Stock Quotes and Charts
eBay's Worst Feedback

Forum
Forum Home
TulipTools News
Advertising
Blogging
Computer Hardware
Domain Names
Ecommerce
Financing
Int'l Trading
Graphics and HTML
Internet Access
Legal Issues
Internet Business
Auction Sites
Classified Ad Sites
Fixed Price Venues
Operating Systems
Programming
Search Engines
Internet Security
Software
Web Hosting
Webmaster Issues
Reviews
Announcements
Off Topic Discussion

Web Hosting
TulipHosting

Domain Names
TulipDomains

Web Stats
TulipStats

Forum Rules
Forum Rules
Privacy Policy

Site Map
Forum Sitemap
Sitemap Topics




Directory| Forums| Internet News|Cart Reviews| DNS Tools| Keyword Research| Site Speed Test| Security| | Domain Marketplace| Domain Blog
TulipTools Internet Business Owners and Online Sellers Community
  • Home
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register
TulipTools Internet Business Owners and Online Sellers Community › Programming and Databases › Programming and Databases › PHP v
1 2 Next »

May I have some PHP coding help please?

  
Pages (2): 1 2 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
May I have some PHP coding help please?
12-11-2006, 01:48 AM,
Post: #1
PG :o} Offline
Tiny Tool
**
Posts: 31
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2006
Reputation: 0
May I have some PHP coding help please?
I am trying to change my gallery over to a script that's going to work better for me, I think. One thing that is bugging me, though is that the new script is putting some junk in the tooltip over the image that I don't like. It's giving the file date creation and I don't have any need for that whatsoever. I would much prefer that it just give the file name. Here is the code:
[code=php-brief] Header("content-type: application/x-javascript");

function returnimages($dirname=".") {
  $pattern="\.(jpg|jpeg|png|gif|bmp)$";
  $files = array();
  $curimage=0;
  if($handle = opendir($dirname)) {
      while(false !== ($file = readdir($handle))){
              if(eregi($pattern, $file)){
$filedate=date ("M d, Y H:iConfused", filemtime($file));
                echo 'galleryarray[' . $curimage .']=["' . $file . '", "'.$filedate.'"];' . "\n";
                $curimage++;
              }
      }

      closedir($handle);
  }
  return($files);
}

echo "var galleryarray=new Array();" . "\n";
returnimages();
?>[/code]

I can see it in there, but I don't know how to remove it!  Tard
Like Post Reply
[+]
12-11-2006, 01:57 AM,
Post: #2
BellisimaJ. Offline
Rabble-Rouser
*********
Posts: 6,609
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2006
Reputation: 0
Re: May I have some PHP coding help please?
I don't do PHP but I thought I'd offer some sympathy, lol. Toothy10
Like Post Reply
[+]
12-11-2006, 02:15 AM,
Post: #3
PG :o} Offline
Tiny Tool
**
Posts: 31
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2006
Reputation: 0
Re: May I have some PHP coding help please?
Thanks, Bell!  Sad1  Lol Let it be known that as soon as I get that part fixed I will have another question about the javascript code that goes with this thing.  Laughing7
Like Post Reply
[+]
12-11-2006, 02:18 AM,
Post: #4
bargainbloodhound Offline
Lawnmower Mouth
********
Posts: 4,372
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Jul 2005
Reputation: 0
Re: May I have some PHP coding help please?
Try this.

[code=php]

echo 'galleryarray[' . $curimage .']=[' . $file . '];' . "\n";



[/code]

What program is it?
"Well, Jay was so giddy that someone named Jay was involved with this site we posted our first non-eBay listing in 3 years here at Lunarbid (we tried two items at Yahoo once upon a time, they bombed)" -Marie posting in a LunarBid thread at OTWA in 2005 wins the award for 'most moronic reason ever given for choosing a venue"

"thanks twat u must have nothing better 2 do. do u talk to all your members like that. will not be recomending your site.
best way to put it is TULIPTOOLS.COM IS REALLY SHIT. DONT JOIN." -pubescent owner of rinky dink off2auction.com in 2011
Like Post Reply
[+]
12-11-2006, 02:22 AM,
Post: #5
PG :o} Offline
Tiny Tool
**
Posts: 31
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2006
Reputation: 0
Re: May I have some PHP coding help please?
Hi BBH. The program is here:
http://www.dynamicdrive.com/dynamicindex...oalbum.htm
but I don't understand your advice. Surely I don't just trade all of what I for that tiny bit?
I don't know where to stick that in what you posted there.  Tard
Like Post Reply
[+]
12-11-2006, 02:23 AM,
Post: #6
PG :o} Offline
Tiny Tool
**
Posts: 31
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2006
Reputation: 0
Re: May I have some PHP coding help please?
O! I think I see where to stick it now!  Lol
Like Post Reply
[+]
12-11-2006, 02:27 AM,
Post: #7
bargainbloodhound Offline
Lawnmower Mouth
********
Posts: 4,372
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Jul 2005
Reputation: 0
Re: May I have some PHP coding help please?
[quote author=bargainbloodhound link=topic=6277.msg36092#msg36092 date=1165803518]

replace this line in that block of code:

[code=php]echo 'galleryarray[' . $curimage .']=["' . $file . '", "'.$filedate.'"];' . "\n";[/code]

with this line.  You only need to change the one line of code.

[code=php]

echo 'galleryarray[' . $curimage .']=[' . $file . '];' . "\n";



[/code]

What program is it?
[/quote]
"Well, Jay was so giddy that someone named Jay was involved with this site we posted our first non-eBay listing in 3 years here at Lunarbid (we tried two items at Yahoo once upon a time, they bombed)" -Marie posting in a LunarBid thread at OTWA in 2005 wins the award for 'most moronic reason ever given for choosing a venue"

"thanks twat u must have nothing better 2 do. do u talk to all your members like that. will not be recomending your site.
best way to put it is TULIPTOOLS.COM IS REALLY SHIT. DONT JOIN." -pubescent owner of rinky dink off2auction.com in 2011
Like Post Reply
[+]
12-11-2006, 02:29 AM,
Post: #8
PG :o} Offline
Tiny Tool
**
Posts: 31
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2006
Reputation: 0
Re: May I have some PHP coding help please?
I tried it. This is what I have uploaded now, and it doesn't work.
[code=php-brief] Header("content-type: application/x-javascript");

function returnimages($dirname=".") {
  $pattern="\.(jpg|jpeg|png|gif|bmp)$";
  $files = array();
  $curimage=0;
  if($handle = opendir($dirname)) {
      while(false !== ($file = readdir($handle))){
              if(eregi($pattern, $file)){
$filedate=date ("M d, Y H:iConfused", filemtime($file));
                echo 'galleryarray[' . $curimage .']=[' . $file . '];' . "\n";
                $curimage++;
              }
      }

      closedir($handle);
  }
  return($files);
}

echo "var galleryarray=new Array();" . "\n";
returnimages();
?>[/code]

I'm getting a blank page.
Like Post Reply
[+]
12-11-2006, 02:54 AM,
Post: #9
bargainbloodhound Offline
Lawnmower Mouth
********
Posts: 4,372
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Jul 2005
Reputation: 0
Re: May I have some PHP coding help please?
Quote:I'm getting a blank page.

Me too.  I can't get it to work without the 'file date' code which is probably because the program sorts the order in which images appear by date.
"Well, Jay was so giddy that someone named Jay was involved with this site we posted our first non-eBay listing in 3 years here at Lunarbid (we tried two items at Yahoo once upon a time, they bombed)" -Marie posting in a LunarBid thread at OTWA in 2005 wins the award for 'most moronic reason ever given for choosing a venue"

"thanks twat u must have nothing better 2 do. do u talk to all your members like that. will not be recomending your site.
best way to put it is TULIPTOOLS.COM IS REALLY SHIT. DONT JOIN." -pubescent owner of rinky dink off2auction.com in 2011
Like Post Reply
[+]
12-11-2006, 03:14 AM,
Post: #10
PG :o} Offline
Tiny Tool
**
Posts: 31
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2006
Reputation: 0
Re: May I have some PHP coding help please?
That's the whole problem! I mean, that's the other problem I was going to get to after I got the tooltip part of it solved. I've been reading about this script over there at that board, and the guy who wrote it gives solutions for these problems to people who have already asked the same questions I have, and when those people return and say that didn't work, they get no response.

It sucks. He swears up and down that it will sort them by filename if you do such and such but it will NOT. I guess I can overcome it by reuploading every bleeping image every time I add a new image so that the order will change? I don't know.

Originally I was using this script that was not the PHP version, and it worked okay, but it was very cumbersome to add a new image. That's why I thought I'd try this php version. It just almost works for me, but doesn't. So sad.

Any recommendations on a gallery proggie that will do this?

You can see what I am trying to achieve by this page:
http://www.backupforgrabs.com/TinyImages/Sports.htm
and this is the page that has the php script on it with the doopid tooltips and the files in the bad order [note the most recent file is yarn.gif and so it appears last?]
http://www.backupforgrabs.com/TinyImages/Activities.htm

grrrrrr  Tongue2
Like Post Reply
[+]
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »




Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Programming Basics mandy 2 5,303 03-26-2014, 02:50 AM
Last Post: ValerieCasady
  PHP CODE HELP Zasik 2 3,206 11-05-2009, 02:27 AM
Last Post: regic
  PHP questions - % of web + finding a developer / host Zemfik 0 4,674 02-26-2008, 11:28 PM
Last Post: Zemfik
  A Guide to PHP Accelerators and Cachers mandy 0 2,991 11-03-2006, 11:16 AM
Last Post: mandy
  A developer's guide to migrating from PHP 4 to PHP 5 mandy 0 2,998 10-04-2006, 10:29 AM
Last Post: mandy
  eBay Developer Program's Adam Trachtenberg talks about PHP and the eBay API regic 0 2,986 08-21-2006, 01:59 PM
Last Post: regic
  P4A - a Rapid Application Development (RAD) framework for PHP misteroriginal 1 3,627 08-06-2006, 06:04 PM
Last Post: misteroriginal
  A few reasons why PHP Sucks!!!!!!!!!! mandy 3 4,096 07-23-2006, 11:01 AM
Last Post: misteroriginal
  TT Articles: Introduction To Regular Expressions In PHP regic 0 3,051 06-19-2006, 07:37 PM
Last Post: regic
  Recommended PHP reading list mandy 0 2,969 03-17-2006, 10:57 AM
Last Post: mandy

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)
  • Contact Us
  • TulipTools Internet Business Owners and Online Sellers Community
  • Return to Top
  • Lite (Archive) Mode
  • RSS Syndication
  • Help
Current time: 03-29-2023, 11:14 PM Powered By MyBB, © 2002-2023 MyBB Group. Theme created by Justin S.
powered by Apache

powered by Linuxpowered by CentOS

Copyright 2000-2013 TulipTools.com. All rights reserved.