Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #11  
Old 11-29-2005, 11:53 PM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
i'm guessing Connie is trying to say that certain words are protected, "img" being one of them.
copy it into a template called ... foo_template.html and try index.php?x=foo
or any other random word you can think of
__________________
touchnothing.net
Reply With Quote
  #12  
Old 11-30-2005, 04:26 AM
nikonratm Offline
forum loafer
 
Join Date: Aug 2005
Posts: 9
tinyblob: tried your suggestion, and still the same problem:
http://giantmecha.com/pixelpost/index.php?x=mini

unmake: tried your suggestion, and then for some reason, the regular index.php didnt work anymore. In fact, the weird thing is that when i change the code as suggested
Code:
if($_GET['x'] == (""||"img")) {
BOTH the img template and the mini template work, but index.php doesnt:
http://giantmecha.com/pixelpost/index.php

Note that right now, the code in index.php is still changed as unmake suggested.

Im more confused than ever?! help!

****NOTE: I changed the code in index.php back, as of 12.30 est, because NONE of the images were working, like even going to browse and then clicking a specific image wasnt working. so to keep the site going, i changed it back. sorry!
Reply With Quote
  #13  
Old 11-30-2005, 07:46 AM
Connie
Guest
 
Posts: n/a
well, in both versions, in 1.4.2 and in 1.4.3, the code is the same:

Code:
if( file_exists( "templates/".$cfgrow['template']."/".$_GET['x']."_template.html" ) ){
    $tpl = file_get_contents("templates/".$cfgrow['template']."/".$_GET['x']."_template.html");

let's say, you have the template "abc_template.html" in your templates-folder

then you must call it
Code:
index.php?x=abc
or maybe
Code:
?x=abc
the script will then look for the template abc_template.html in your template-folder and execute it

I used this for many different templates, for example I made

aboutenglish_template.html or I made info_template.html and this worked

I do not see why this does not work at your site, is the template really there with the correct name?
Reply With Quote
  #14  
Old 11-30-2005, 08:16 AM
Connie
Guest
 
Posts: n/a
well, in both versions, in 1.4.2 and in 1.4.3, the code is the same:

Code:
if( file_exists( "templates/".$cfgrow['template']."/".$_GET['x']."_template.html" ) ){
    $tpl = file_get_contents("templates/".$cfgrow['template']."/".$_GET['x']."_template.html");

let's say, you have the template "abc_template.html" in your templates-folder

then you must call it
Code:
index.php?x=abc
or maybe
Code:
?x=abc
the script will then look for the template abc_template.html in your template-folder and execute it

I used this for many different templates, for example I made

aboutenglish_template.html or I made info_template.html and this worked

I just installed again a clean 1.4.2-version and a clean 1.4.3-version
I added a mini_template.html to both versions and in both versions the image was not resolved

you can check that at http://www.bildgier.de/pp/142/index.php?x=mini and at http://www.bildgier.de/pp/143/index.php?x=mini

so I see no difference between the versions

if x is empty, the current image is taken (in image_template.html)
if x is not empty, you must specify which image you want, so you need an image_id etc... so this must be the reason why the image is not resolved

but how can this be different in 1.4.2? It was the same!
Reply With Quote
  #15  
Old 11-30-2005, 08:32 AM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
Hehe, i think, instead of confusing ourselves by trying to troubleshoot this specific issue:

nikonratm - tell us exactly what you'd like to achieve, and we'll tell you how to accomplish it!

(ps. i was at the very front of RAtM's last live performance. i was so busy trying to stay alive in the moshpit, and helping the TWO girls who fainted, and the guy who had an epileptic fit, that i didn't really get to head any of their songs.)
__________________
touchnothing.net
Reply With Quote
  #16  
Old 11-30-2005, 09:03 AM
nikonratm Offline
forum loafer
 
Join Date: Aug 2005
Posts: 9
Quote:
Originally Posted by tinyblob
Hehe, i think, instead of confusing ourselves by trying to troubleshoot this specific issue:

nikonratm - tell us exactly what you'd like to achieve, and we'll tell you how to accomplish it!

(ps. i was at the very front of RAtM's last live performance. i was so busy trying to stay alive in the moshpit, and helping the TWO girls who fainted, and the guy who had an epileptic fit, that i didn't really get to head any of their songs.)
tiny, you make a great point, i had a feeling i was doing this wrong from the beginning, so now is as good a time as ever to do it right.

OK, the point is, on the larger site i designed, http://giantmecha.com/ the client (err, my brother) wanted to be able to use pixelpost in conjunction with the rest of the site, in a "picture of the moment" fashion. If you go to the site now, you can see exactly what I wanted (and had working for a while there!). The point is, the most recent pixelpost is in a small iframe on the right of the site, and when the user clicks the image, the whole pixelpost opens up in the site's content window (using styleswitcher).

I mean, the site now is exactly how it should work (and did), the problem is of course that the one up there right now is totally faking it, i just made a static html page (http://giantmecha.com/pixelpost/fakepixelpost.html) for purposes of not disrupting the site while i tried to figure this out.

oh, and i was at that concert too—they're still one of the best live acts ever, imho.

and thanks again for all your help you guys, its really most appreciated.
Reply With Quote
  #17  
Old 11-30-2005, 09:38 AM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
Okay, a couple of points.

assuming you know php:

if pixelpost and that website are cohabiting on the same server, you could always poll the database from that page. that way you can "glean" any information you want from pixelpost and display it on your site. this is the solution i'd go for every time.

if pixelpost exists on a different server, or you don't want it to access the database you can use php to interpret your rss feed and extrapolate the latest image.


assuming you don't know (or have) php:

i released an addon a while ago which you install to pixelpost, then link to in an image tag. this will always display the latest thumbnail. no title or date though.


i personally won't advise you on an iframe solution for this reason.
iframes suck.
i like stressing that point.
you're loading a tiny little iframe which is actually executing the entire pixelpost codebase. including all the mysql queries, addons, and function scripts. just to load a tiny little graphic. there's a good chance your tiny iframe will be the last thing to load on the page.

yeah this is also true of my image addon, which is why i recommended using php to poll the database first.
__________________
touchnothing.net
Reply With Quote
  #18  
Old 11-30-2005, 12:57 PM
nikonratm Offline
forum loafer
 
Join Date: Aug 2005
Posts: 9
couple of counter[hehe]-points:

sadly, i dont know php. so though your solution sounds lovely, its really not within my grasp. it sounds to me, like the idea is to "poll the database" via php, to figure out which is the most recent image, and simply display that single image. sounds great, but how the heck would i do that? (they are on the same server, btw).

as for your addon, title and date are actually very important. im also not sure why you speak disparagingly of iframes. they are a pain in the butt, but i find them to be rather elegant, especially with some good css.

point is, id love to do it your way, polling the database, etc. if you can give me a code snippet, or point me in the direction of something that will help me figure it out on my own...im very willing to try.
Reply With Quote
  #19  
Old 11-30-2005, 01:29 PM
tinyblob's Avatar
tinyblob Offline
team pixelpost
 
Join Date: Nov 2005
Location: scotland
Posts: 523
i just hate iframes, it's personal preference. i believe content should be syndicated - iframes "steal" content, if you get my meaning. i wasn't inferring that you shouldn't use them, just that i personally would not.

i will happily write you code to get the latest image and so on. if you email me your index page, zipped up, i'll add the php and give you it to upload if you'd like.
__________________
touchnothing.net
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 12:13 AM.

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