Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 09-30-2005, 07:56 PM
jagX's Avatar
jagX Offline
pp regular
 
Join Date: Sep 2005
Posts: 24
Send a message via MSN to jagX
Exclamation select page background color

I've been struggling to make an optional field in the admin template to set the page background color on a post basis. I've made another column in the pixelpost table, called color, added a field with a variable named color to the admin template and added this variable into the mysql statement that adds all the other vars to the db on sumbit. Blah...nothing. I can enter anything but nothing is stored in the db. Can somebody please give me the code for this feature? Thanks.

my website : http://glimpse.zeeblo.com/pblog

this is the code for the field:
PHP Code:

    
<div id='jcaption'>Background Color (of this format 12345 {!do not put # sign}) </div>
    
<div id='content'><input type="text" name="color" style="width:45%;" /><br /><br /></div
this is for the insertion in the db
PHP Code:

        $image 
$filnamn;
        if(
$status == "ok") {
        
$query "insert into ".$pixelpost_db_prefix."pixelpost(id,datetime,headline,body,image,category,color)
        VALUES('NULL','$datetime','$headline','$body','$image','','$color')"
;
        
$result mysql_query($query) || die("Error: ".mysql_error()); 
Reply With Quote
  #2  
Old 10-01-2005, 11:52 PM
parl Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
I'm curious as to how to get this working as well.
Reply With Quote
  #3  
Old 10-02-2005, 08:43 AM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
@jagX: make from it downloadable mod and add it to pixelpost page (registering before as developer).
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #4  
Old 10-02-2005, 11:10 PM
jagX's Avatar
jagX Offline
pp regular
 
Join Date: Sep 2005
Posts: 24
Send a message via MSN to jagX
@GeoS: I don't think you got me, I'm not a php/mysql code, and I'm addressing to you guys for help because I can't do it. I'll gladly make the mod and everything, if I know HOW.
Reply With Quote
  #5  
Old 10-06-2005, 10:41 PM
jasonspix Offline
forum loafer
 
Join Date: Oct 2005
Posts: 2
Background changer

I managed to get something like this working on my site. Not sure if you are still trying to get it to work, but I put instructions and the modified files on pixelpost's site. http://www.pixelpost.org/v1/index.ph...ds&details=119

Hope it helps.
Reply With Quote
  #6  
Old 10-08-2005, 11:54 AM
parl Offline
forum loafer
 
Join Date: Jul 2005
Posts: 7
I can't thank you enough for your help Jason. This works great.
cheers
Reply With Quote
  #7  
Old 10-10-2005, 12:41 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
thats the coolest hack EVER!
__________________
i should say more clever stuff
Reply With Quote
  #8  
Old 10-17-2005, 06:33 PM
skennedy1217's Avatar
skennedy1217 Offline
pp veteran
 
Join Date: May 2005
Location: Chattanooga, TN
Posts: 71
I almost implemented this. What held me back is that I want the option of white, grey, dark grey and black backgrounds. For the first two colors I need black navigation hyperlinks. For the darker background I need white or light grey navigation links.

I suppose what I am looking for is the ability to set the style sheet for each post and not just the background. I have a style switcher already (running a modified version of Jasonpix's template). The default them is dark grey, and I suppose I could instruct people in the comments/info on which background I think is best, but what would be cool is to have it predetermined for each post and remove the user's ability to change it.
__________________
www.chromaticus.net
Reply With Quote
  #9  
Old 10-17-2005, 06:53 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
Quote:
Originally Posted by skennedy1217
I almost implemented this. What held me back is that I want the option of white, grey, dark grey and black backgrounds. For the first two colors I need black navigation hyperlinks. For the darker background I need white or light grey navigation links.

I suppose what I am looking for is the ability to set the style sheet for each post and not just the background. I have a style switcher already (running a modified version of Jasonpix's template). The default them is dark grey, and I suppose I could instruct people in the comments/info on which background I think is best, but what would be cool is to have it predetermined for each post and remove the user's ability to change it.

this should work on the same principle - but rather defining a stylesheet in the databse rather than just a hex code.
Reply With Quote
  #10  
Old 10-17-2005, 07:01 PM
skennedy1217's Avatar
skennedy1217 Offline
pp veteran
 
Join Date: May 2005
Location: Chattanooga, TN
Posts: 71
Cool, I'll have to give that a try!
__________________
www.chromaticus.net
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:01 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs