Nice Site Vilkacis.
- Baphnedia
- Moderator

- Posts: 2326
- Joined: Sun Dec 26, 2004 11:23 pm
- Gender: Male
- Location: Portland, OR
Nice Site Vilkacis.
I was just over browsing your site... I didn't realize you'd made one until you changed your signature. How is it that you have your 'latest article' and other 'latest' tags in your signature?
Re: Nice Site Vilkacis.
Originally I made a php script that polled the database for the latest article/gallery item and output an image. I then linked to the script in my sig using a trick to fool phpBB into thinking it was an image (just stick /fake.png on the end, or whatever filetype is appropriate).
However, this was causing too many connections to my database (one connection every time someone saw my sig. Ouch). So, what I did instead was make an update script that saved the images to a folder. I then linked directly to the images. All I have to do is run the update script everytime I make a new article or gallery item.
It's not a complicated script. It's a bit messy (no comments, inefficient, etc.), but you can take a look (Note: I deleted some sensitive database connection information at the top). You'll also have to make sure you have permissions set correctly on the image files you are writing if you wish to output them correctly.
If you want more detail or for me to explain any part of the script, just ask.
-- Vilkacis
However, this was causing too many connections to my database (one connection every time someone saw my sig. Ouch). So, what I did instead was make an update script that saved the images to a folder. I then linked directly to the images. All I have to do is run the update script everytime I make a new article or gallery item.
It's not a complicated script. It's a bit messy (no comments, inefficient, etc.), but you can take a look (Note: I deleted some sensitive database connection information at the top). You'll also have to make sure you have permissions set correctly on the image files you are writing if you wish to output them correctly.
If you want more detail or for me to explain any part of the script, just ask.
-- Vilkacis
- Lupin
- Legendary

- Posts: 6129
- Joined: Sun Jun 19, 2005 11:26 pm
- Custom Title: Ninja BOFH
- Gender: Male
- Location: 29°30.727'N 98°35.949'W
- Contact:
Re: Nice Site Vilkacis.
That's pretty much how the counter in my sig works, but since I have control of server and the db, the connection it makes is persistant (don't do this on shared hosting or you run the risk of making too many connections.)Vilkacis wrote:However, this was causing too many connections to my database (one connection every time someone saw my sig. Ouch). So, what I did instead was make an update script that saved the images to a folder. I then linked directly to the images. All I have to do is run the update script everytime I make a new article or gallery item.
