PDA

View Full Version : Crazy idea?


Fellow Eskimo
04-26-2005, 11:10 PM
Ok, I know this is a crazy idea, but is it possible to add an additional field in the admin section for color input? Let me be clearer. I would like a field where I could enter a HTML color value (such as #ffffff) and that be the background of THAT picture individual link. Possible? Ive seen it done, but im not sure how.

Example:http://greyexpectations.com/

I could alter my layout to accept the values...if I knew how. Yes yes, this is way left field.

raminia
04-27-2005, 10:29 AM
yeah it could be! really!

just like Photoblink.com :)

GeoS
04-27-2005, 11:22 AM
But there are 2 different ways of this idea:

1) http://greyexpectations.com/ - many CSS versions
2) bgcolor switcher

I think that first one won't be done by PP dev team. Second is possible as addon + template.
I think that in more general way (adding bgcolor as table cell bg) it can be done as official part of PP code (as additional tag avalible for all templates).

Rob
04-27-2005, 06:14 PM
Rather than just colors that get added, I think it should be a field for stylesheet to use. Notice how the background and the matting color changes. I think it would be better to somehow list available CSS styles and switch them, that way, you could change more than just one color, you could change the background, text, or even layout to suit your photos...

raminia
04-27-2005, 06:27 PM
but what if you (author) want one photo to have a black backgournd and another one to have a white BG?

That's what is available in photoblink publishing...

Rob
04-27-2005, 06:37 PM
but what if you (author) want one photo to have a black backgournd and another one to have a white BG?

That's what is available in photoblink publishing...That is what I mean. On the image post page, we could have a dropdown to select different CSS files that only change the colors. The templates could still have one common CSS file for stuff that doesn't change per photo.

Joe[y]
04-27-2005, 08:28 PM
but what if you (author) want one photo to have a black backgournd and another one to have a white BG?

That's what is available in photoblink publishing...That is what I mean. On the image post page, we could have a dropdown to select different CSS files that only change the colors. The templates could still have one common CSS file for stuff that doesn't change per photo.

why keep them separate? there could simply be a folder designated for stylesheets that the user can adjust as they wish (put new template stylesheets in etc) and just choose each time they post a photo - or set a default css if the option does not interest them.

GeoS
04-27-2005, 09:01 PM
There is other possibility - tag for CSS filename selected from list on upload image form.
If you don't take special CSS fiel then you should get standard template CSS file.

What do you think about that??

Joe[y]
04-27-2005, 09:10 PM
sounds good to me!

blinking8s
05-02-2005, 07:54 AM
id personally like to see the template system revised with a style section, so the default template is simple, but users have the ability to change things like border color/image ect...just like how they do forums and other applications...but that would be a pretty steep turn for pixelpost

Fellow Eskimo
05-02-2005, 05:39 PM
I would *really* like to see it, however it could be done. Ive used CSS styles before, so Im familier with them...its just the hard coding (outside of css and html) that im clueless about.

Joe[y]
05-09-2005, 05:23 PM
www.smallestphoto.com now uses this idea of a different style for each photo.

I e-mailed the developer who made this mod and this was his reply:

Hey.

I changed the files directly as it was the easiest route for me. I'm a
.NET programmer professionally and a PHP programmer on my own time. :)
I can look into figuring out how to make it a plugin I guess.

As to how I did it:

I added a column to the database to hold the value.

I changed the template to have a new value to preg_replace.

On the main page I do execute a little if statement that checks for a
custom stylesheet, and then sets up the css link and puts it into the
template via preg_replace. Basically, the values in the custom
stylesheet just overwrite the original values producing the desired
display.

For the admin I simply put a text box on the image post page that
saves to the stylesheet column of the db.

Scotty

Hopefully that will help some php programmer with the creation of an addon.

gardenlevel
07-27-2005, 08:00 PM
Greetings friends, My name is Dave this is a bit odd for a first post but here it goes:

I wanted to be able to contol the colors of each page so I added two columns to the pixelpost_pixelpost db. I added color1 and color2 (I've considered having as many as 5 diffrent changeable colors).

Then I added a couple fileds to the submit and edit forms of the admin index file so I can specify and change colors. I did update the MYSQL code and it works great.

I had to create two new tags (<IMAGE_COLOR_ONE> and <IMAGE_COLOR_TWO>) in the root index.php and I use those in my document to change the color.

You can check it out on my page: http://www.gardenlevel.com/photoblog/

I'm good enought to create this hack of the system but I have no idea how do it as a addon (I'm not even sure that's possible).

Also, I'm using a template where the CSS is in the body - I'm not sure how this would work if there were an external CSS file...

If anyone is intrested how do I go about sharing my hack?

alexpen
08-01-2005, 02:10 PM
I would LOVE to see such add-on in Pixelpost!

Hey Dave,

Could you post your changes you did for .php in admin interface and other pages?


Regards, Alex

kicki
08-16-2005, 12:35 PM
I've done something like that in my blog (http://kicki.kanske.net). Added a css-field in the database, and a dropdown menu in "Post a new picture" (I have a bunch of different css-files depending on which look I wont for that day...).
Made a bunch of other alterations too, though - have no idea how to make an addon out of it...

Fellow Eskimo
08-16-2005, 03:04 PM
I definitally like what both of you did...unfortunally I dont know how to do it on my own! An addon would be lovely if you could figure out how to do it...heck, or even step by step directions for dummies like me.

gardenlevel
08-16-2005, 07:04 PM
I'm posting this here because it's where the thread started but please note that this is a HACK not an ADDON. I have no clue how to make it an addon because I have to edit the forms in the admin index.php and the other mod has to be in the root index.php.

Sorry it took so long to get this up but I wanted to upgrade to 1.2 before I posted my modifications and I've been out of town.

First you'll need to add two rows the (prefix)_pixelpost db. Set them as varchar with a limit of 6 and name them "color1" and "color2" (minus the "'s) - do this in phpMyAdmin.

Next, there are only two modified files (index.php and admin/index.php). Back up you originals and then copy my hacks over the originals. Once this is set you can start to modify colors for each file. All of my modifications are between the //begin edit and //end edit notes. There are some other hacks there that don't really apply so feel free to delete the.

To incorporate colors into the templte you need to replace your color (XXXXX) with the color defining variables "<IMAGE_COLOR_ONE>" and "<IMAGE_COLOR_TWO>" when you go to change a color to the variable leave the # or your colors wont work in netscape/mozilla. If you use these variables in a style sheet it must be contained in the local document, NOT in an external style sheet.

You can look at my template to see how I did it and even copy whatever you want. There are other hacks I made in the template as well (<IMAGE_WIDTH_MINUS>, etc.) that you can ignore...

http://www.gardenlevel.com/files/pixelpost_1.4.2_EDIT_gardenlevel.zip

http://www.gardenlevel.com/files/gardenlevel_template.zip

Contact me with any questions..