News:

The anti-spam plugins have stopped being effective. Registration is back to requiring approval. After registering, you must ALSO email me with your username, so that I can manually approve your account.

Main Menu

Need help on randomly displaying images w/ hyperlinks

Started by fesworks, November 09, 2006, 01:27:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fesworks

Cool! I'm getting the hang of this code now!

Now that daunting (sp?) task of copy-pasting descriptions and making Banners.

... heh... Nerdboy :P

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

Xepher

It's not really possible to do that... not easily anyway. You can run a webserver on your local computer, but it's a major pain. I'd suggest editing the code on the server itself. You log in through SSH and then you can run a command line editor. It's good for small/quick changes, but if you're doing a major edit, it's probably easier just to reupload. I personally use SSHFS, which lets me mount a remote server directory via SSH as though it were a local folder. If you're not using linux or something similar I don't know where to point you though.


Now, I think I've redone a much better script in the past few hours. The actual output is ugly as sin, but that's the part I assume you're going to tweak. The code itself is a lot more functional, allowing you to upload images and descriptions, and delete things from a web interface, as well as get a quick thumbnail-ish view (it doesn't actually thumbnail, but just lays them out the same way) of all the banners. It's not perfected yet, but I'm tired tonight, and it's mostly functional. I'd like you to go play with it and find out what's still broken, and then I'll fix it tomorrow.

The display code. http://xepher.xepher.net/Banners/bannerDB.php which doesn't have many banners installed yet, so it doesn't really show much.

The admin interface is accessed by adding "?admin=1" to the file's url. http://xepher.xepher.net/Banners/bannerDB.php?admin=1 It's set up to ask you for a password on initial install, and after that require you to login (with cookies) in order to add or delete banners/descriptions. The current password is "slingshot" so you can try it out where it sits.

The raw code for the file is viewable at http://xepher.xepher.net/Banners/bannerDB-source.php if you want to copy it to your own folder and start playing with it. You mainly just need to edit the "$baseurl" variable to tell it where it sits, and it should install itself from there. Note that the admin view uses a lot of fancy graphics and some javascript files that are located in my particular install. You don't need them for it to work, but if you want them, you can just download them from my install with the "save as" thing or I can make you a zip file of all of it sometime tomorrow. You can pretty easily strip out the java/pics or replace them with your own if you want. If you try your own copy and get it screwed up, delete the database file "banners.sqlite" and it will start back at the install screen and ask you for a new password.

Oh, if anyone else wants to play around with it, feel free to log in and add your own fake banners to see how it works. Let me know if you find bugs.

Hmm... one more thing. There's a couple bits of code leftover from my image catalog program. Two variables, $width and $height which are set to 400 and 200 respectively right now. If you decide to go with different sized banners, you may want to change those to match, or it could make some of the stuff look funky.

fesworks

Aww man, and after I just got to Schwarz Kreuz! (3rd comic, I skipped a disabled site ;) )

I'll check this new code later. For now I'm going to stick to making some more banners.

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

Xepher

No problem... I think you'll like the new script a lot better, as it doesn't require you to edit any code to add or delete banners/members.

fesworks

Ok, I'll looking into that more. I was actually planning on using basic 468x60 banners for this.

That admin section is wild though 0_0

cool :D


This is all I have been working with so far:
http://fesworks.xepher.net/Banners/banner.php

getting descriptions and banners going ;)

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

fesworks

Xepher. Can you give me an official "Xepher" font? I'm going to try something with some images, and would like a uniform font for things representing Xepher.Net

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

fesworks

Still using the older, first code you presented, I made a page with an iframe to display it.
http://fesworks.xepher.net/Banners/Display.htm


I finally checked the new code.... code shock o_0
I'll have to definetly tackle that after the PSI and Ardra updates this Mon and Wed.

Still really awesome! thanks for helping so much!



EDIT: Actually, for the time being, it's been kinda fun making the banners! I've been going in order as listed on the Xepher Site Directory, and descriptions... adjusting them slightly.


DAMN PHP! hpw come PHP can't produce special characters? I've noticed this with "©" and "ñ" thus far... Remedies?

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

fesworks

Wow, finding a few sites that have not been updated for nearly 9 months to a year :/


(boy, I'm blabbing a lot :P )




EDIT:

All done with the comic list:
http://fesworks.xepher.net/Banners/Display.htm

I excluded the disabled account ones, a couple I deemed as "art" because there were not actual webcomic on the site, and I also excluded Two comic sites had their entire archive taken down. I only e-mailed one of them.

I included ones that seemed to have not updated since summer of 2006 or earlier (for at least archive purposes at this time.)

If you would like a semi-comprehensive list of the sites in question just ask.

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

Xepher

I may get that list from you at some point in the near future, but I don't have time to deal with dead accounts right now, since they don't really hurt anything by being there.

Official font: Umm... there's not really one. The one currently in the logos on the main site is "Dragonwick" but that's not really something suitable for paragraph text (or really anything but logos) due to it's weirdly sized capitals. What is it you're wanting to do?

Code Shock: Well, as you can see, I didn't document much of it either, as I'm not really planning for you to change much of it. Really only the bit at the end where it actually outputs the HTML, and a few minor settings like the $baseurl one. Ask all the questions you want and I can try to help you understand it though.

PHP and special characters: PHP does unicode just fine. Show me an examples of what works in a normal webpage, but doesn't work in php, and I'll figure out how to set it up. Usually you just need to use UTF-8 for the character set. The two characters you mention, are they showing up okay in the forum here? I see a circle-c (copyright) and an "n" with a ~ (wiggle line) over it. If that's correct, then you should note that this forum is PHP and uses UTF-8 character encoding.


Something weird... the banners for PSI and Nerdboy don't show up in my browser (Firefox 2.0.0.1) and I also note they're the only two .gif banners. Both images work fine if I view their URL directly though. I have no idea why that is.

fesworks

No they never work on a PHP page like on a website. ALT+0241 prints a "ñ" in the HTML code part when I edit the PHP page, but it shows up as a "?" when online. So I guess I need to know how to make it so the PHP pages, when I edit them, that they show up... the GARNET webcomic's description should say "(Tambien en Español)", but what prints one online is "(Tambien en Espa?ol)"


That is wierd with the GIFs... when I get a chance, I'll make JPEGs.


RE: Code Shock RE: yea, I figured as much, but I was on a roll with the old code. I'll look at the new stuff later.


What am I planning to do? Well, I kinda wanted to make a slightly more visual Site directory, starting with webcomic. Figured I'd get some uniform text images of the Xepher Name on a page listing all the webcomics (then the Art section perhaps, though it'd get a bit harder to properly work out from there). Not trying to go over your head or anything, I'd just thought it'd cool to work on when I have free time here and there.

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

Xepher

Okay, so you just want the word "Xepher.Net" in a font for the page header or some such? If it's a logo/header type thing, just go with Dragonwick, as per the graphic logos from the main page. Don't worry about "going over my head." I mean, for one, there IS no one over my head. :-) I encourage community effort, and it seems like a great idea... I just don't want you (or anyone that's putting in time/effort for the community) to get upset if I don't particularly like their idea or design... or if I make it obsolete by doing my own "official" version in the future. Like the banner exchange thing, I probably WILL do an "official" version of that at some point in the future, and I don't want you to be offended or feel like I'm pulling the rug out from under your hard work. Don't get me wrong, I try to keep people involved, and even if I do make something more official, I'll probably ask you to manage it (if you're still interested at that time) or otherwise help. Yet it's also entirely possible that I'll completely redesign the layout or look to better match the future site, thus "invalidating" a lot of work you've done.

Now, that said, if you're okay with that possibility, feel free to work on this and do it however you want for now. Ask me whatever you want, and I'll try and help you as best as I can too. One small note, I don't know if you're actually contacting site owners about this or not. I would suggest you should get people's permission (and possibly approval on banner/description) before putting them into this in any sort of finalized way. Don't worry about it while you're just testing and and working on it, but before you make it live, it needs to be an opt-in thing.

fesworks

Actually, I was planning on saying more than just "Xepher.Net" and more along the lines of a whole tagline like "Xepher.net Webcomics" or "Xepher.Net Artist Alley" etc. But I'll try to see how they'll look, which it might since it's planned as a "header".

And don;t worry about making something better. If this sort of things gets you inspired to do it yourself, go for it :P I just think I could boost visitors by putting some purty pictures along with the text ;) Some people don;t even realize this is a "Free Thinker" comminity as much as some sort of host service like Stormpages or something, though mysteriously without ads.

Once I get this banner exchange done, I'll be emailing everyone if they'd want to change their Banner (because I basically made all but like 2 banners ;) ) or their description. Then I'll ask that people place the iframe code in their Links section and/or their front page (purely voluntary, I'm not going to remove anyone from the list if they don't post it.... just means I won't feature or showcase it on the "Hub Page").


So yea, Just an ambitious project I have... while it's not really in my "authority", I get these ideas from time to time and run with it! But if end up making it obsolette or whatnot, do it ;) If you have ideas here and there after I get mine up, I'll see what I can do! :D I'm still a quite a ways from full completion.





Also, is there a uniform font size that won;t change between IE and Firefox? Everything I make look good for Firefox it like 1 whole point small on IE... : Conversely (right word?) Comixpedia is written for IE, so everything is one point BIGGER on Firefox :

I mean, visitors will have various browsers... can I tell the code to display the size in pixels instead? That's uniform right? All I know is < font size=3 > etc... and that means "Points" I believe.

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

Xepher

Don't specify scalable elements (such as fonts) in pixels, as a general rule. Image sizes are fine, because images ARE sized in pixels. Use font point sizes... in CSS, you should use the absolute length elements to do what you want. http://htmlhelp.com/reference/css/units.html#length If you were specifying anything BUT font, I'd suggest the "em" or "ex" unit, but since it's the font itself you want to be absolute, probably use "pt." The reason to use units like that, is that they'll scale for different display resolutions. If you say "12 pixels" it looks large enough to read on 800x600 maybe, but if someone has a 1920x1200 monitor (I'm about to buy one) it would be stupidly tiny and unreadable.

Hmm... thinking on that, and I think I see your problem. If the font scales at all, it's going to break stride (as it were) with the banner size. Generally speaking, is a really a big deal if one browser shows it a little bigger/smaller? Maybe make it with enough spare room that it doesn't visually break things if it's tweaked a tad. Keep in mind, if you use a font like Dragonwick, most people won't have it, so it won't show up for them anyway, and will look WAY different.

fesworks

Alrighty, I'll play with those settings then.

Well, What I do, since I know a lot of people DON'T browse with IE, I size everything to look nice at a maximum in Firefox. THAT way, when someone uses IE, it becomes smaller (instead of bigger) and does not mess up maximum set boundaries in line breaks, cells, tables and coordination with images.

And as far as cool fonts... I never uses them in plain text (unless you can force load them to viewers), because people just will not have them, then your site looks like crap because its the lame default font. So I always use images for cool fonts.




OOOO!!! OOOO!!!

Is there a way to detect the browser and then change the font size accordingly? Probably need cookies for that...  I've come this far to avoid cookies, and I'm not going to start :P.

MWAHAHAHAHAHA!

*goes back to chiseling in stone*

www.PSIwebcomic.com
www.TheShifterArchive.com
www.ArdraComic.com
www.WebcomicBeacon.com

Xepher

You don't need cookies, you can do it with PHP (or javascript) Google "user-agent headers" to see how to do it.