PDA

View Full Version : Additional page in template


jchabalk
12-30-2006, 02:36 AM
I'm having a problem i can't quite figure out. I have built a template based on the pixelpost-ligh/dark templates. I've changed nothing except some of the css particulars and the page layout etc, and i've added a couple of pages with no problem (about/browse etc)

anyway, i'm working on an something that would run external to my site and want to create a couple of additional pages but i'm having problems. The first page i want will simply display a static link directly to the current image, no css, no formatting, just the link in the form: http://www.wxyz.com/images/image.jpg (not clickable, just text)

I've gotten a tag to work to display this text just fine, and i can add it to my image_template.html file and it displays just fine. i've created a new page called link_template.html, but when browsing to www.xyz.com/index.php?x=link i get nothing. i have tried a variety of things to make this link display, but none of them have worked. When viewing page source all i see is my tag (eg: <SITE_URL><IMAGE_NAME> or whatever)

I have a feeling that i'm just missing something pretty simple here, but i don't know what it is. if it makes any difference, when i copy my image_template.html file to image2_template.html and browse to http://www.wxyz.com/index.php?x=image2 i also get blanked out variables, but when i use my about_template.html page and go to ?x=about everything works as it has, variables such as <SITE_NAME> return the proper data.

Variables that are static (aka: not part of the dynamic image content, site name, base url etc) seem to display fine, but variables that rely on image data do not.

Any ideas?

DikkieBurger
12-30-2006, 09:36 AM
Is PP installed correctly? Please share us your admin-panel info.

jchabalk
12-30-2006, 09:55 AM
I'm assuming you're talking about the "general-info" information about the install etc? it looks ok to me, never had any problems with it:

Host Information
URL http://www.ebokeh.com/cgi-system/php.cgi
PHP-version 4.4.4 (Pixelpost's min requirement: PHP version: 4.3.0 )
MySQL version 5.0.24a-standard-log (Pixelpost's min requirement: MySQL: 3.23.58 )
GD-lib bundled (2.0.28 compatible) with JPEG support
File Uploads to pixelpost site are possible.
Server Software Apache/2.0.54 (Unix) PHP/4.4.2 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
EXIF Pixelpost is using exifer v1.5 for EXIF-information.

Paths
Guessed imagepath: /home/jchabalk/htdocs/com.ebokeh/htdocs/cgi-systemimages/
Configured Imagepath: /home/jchabalk/htdocs/com.ebokeh/htdocs/images/
Image Directory: OK - Can we write to the directory? YES. CHMOD: 0777
Thumbnails Directory: OK - Can we write to the directory? YES. CHMOD: 0777
Language Directory: OK
Addons Directory: OK
Includes Directory: OK
Templates Directory: OK

The only things that are strange to me are the "URL" and the Guessed Imagepath, that looks like some trick my provider is doing as those directories don't exist. The configured image path is correct. The behavior is strange though, as it there's a configuration detail missing etc..

DikkieBurger
12-30-2006, 11:25 AM
Set the URL at general options to http://www.ebokeh.com/ and the image path should be something like ../images/.

jchabalk
12-30-2006, 06:23 PM
the URL is set to: http://www.ebokeh.com/

the images path is set to the absolute path of the directory on the filesystem, not relative to the web root. i think i had problems when setting it as a relative path. i just tried setting it to "images/" and my site works fine. i re-tried my static page and the results are the same as before. Just blank tags again..

DikkieBurger
12-30-2006, 08:45 PM
Mm, I looked at that page, the source oly contains <IMAGE_LINK_TEXT>
...

Please post the source of your link_template.html

Dkozikowski
12-30-2006, 09:28 PM
If you goto his link_template.html file and check out the source, all you see is: <IMAGE_LINK_TEXT>

Nothing else :confused:

http://www.ebokeh.com/templates/merced/link_template.html

jchabalk
12-31-2006, 01:50 AM
i've tried it a bunch of different ways - currently the file is one line: <IMAGE_LINK_TEXT>

If i put this same tag anywhere in image_template.html it returns the correct information. i've tried copying the image_template.html file to a new name and removing most everything (and also nothing) except for that tag and i also get the same resumts: no data. it's perplexing as everytime i use my image_template.html file things work properly, but if i try it in any other template file that i have (which otherwise do exactly what they should) i get the same results: nothing.

There must be either a problem with the way the *_template.html files are being parsed, or there's a config issue in my site, but i'm not seeing it.

thanks everyone for your help! i really appreciate it!

DikkieBurger
12-31-2006, 07:16 AM
MM, I don;t get it.

The image tag is only parsed in the image_template, you have to put something in the links template else it won't display anything.

jchabalk
12-31-2006, 08:39 PM
that's what i think, but what is it that has to go in the link template to make it parse the tag? i've looked through my image_template and it's pretty straightforward. i tried setting up the link_template.html file with the head section of my image_template.html and the results didn't change.

if i put any of the static tags <SITE_NAME>, <SITE_URL> by themselves in the link_template they work just fine. kinda strange.

Dkozikowski
12-31-2006, 09:28 PM
OK. I have decided to actually take the time and really look into this.

What tag is <IMAGE_LINK_TEXT> supposed to produce?

Is it some kind of addon?

There is no such tag pressent in pixelpost 1.5RC while looking though the index.php file.

This could be your answer. The tag, <IMAGE_LINK_TEXT>, does not work becuase it is not associated with anything related to pixelpost.

More info would be helpful.

Thanks.

jchabalk
01-01-2007, 03:20 AM
Here are the additional lines that make up <IMAGE_LINK_TEXT>

in index.php:

$image_link_text = "images/$image_name";
. . .
$tpl = ereg_replace("<IMAGE_LINK_TEXT>",$image_link_text,$tpl);

I have added <IMAGE_LINK_TEXT> to the image_template.html file and it appears as it should. Add it to an alternate template file and it doesn't work at all.

all i'm really trying to do is get a text version of a static URL to the primary image. i'll then want to be able to also generate static links to previous pictures .

Something else i noticed when troubleshooting this is that if i pass the image template to the index.php page i get a similar (broken) result.

eg:

http://www.ebokeh.com/index.php?x=image generates a generally blank page (no image data)

from my understanding of how this works the above link should generate the same output as http://www.ebokeh.com (http://www.ebokeh.com/index.php), as all the ?x=image addition does is pass the image_template.html page as an argument.

Dkozikowski
01-01-2007, 08:26 AM
I see what you mean about ?x=image but, I am still unable to find the <IMAGE_LINK_TEXT> in my index.php source code.

What version are you using?

What exactly are you trying to do?

You just want to display the url to each image on a seperate page but not clickable?

jchabalk
01-02-2007, 03:17 AM
the <IMAGE_LINK_TEXT> tag is one that i added to index.php. it was done simply to allow me to have the URL to a specific image (the main image, and then previous/next as needed).

anyway that i can accomplish that would solve my problem. i was looking through the available tags and didn't see one that did that. (non-link, just text).

The version of pixelpost i'm running is 1.5 (April 2006)

thanks!

Dkozikowski
01-02-2007, 08:55 PM
I made an addon for you. hold on a few minutes and i will upload it

jchabalk
01-02-2007, 09:06 PM
i had a chance to try some more things here...

i had initially created the <IMAGE_LINK_TEXT> tag in index.php as a slightly more elegant way of achieving the plain text URL output. It does work as i expected, but only when it's added to the image_template.html.

I went through the tags section of the wiki and tried to construct the same output out of included pixelpost tags. The two tags that i need to use are <SITE_URL> and <IMAGE_NAME>

I constructed the URL to be output as such:
<SITE_URL>images/<IMAGE_NAME>

This does output the correct URL when used in my image_template.html page, but again when i put these tags into the link_template.html it does not work. i just get "images/" displayed as that's the only static text. when viewing the page source the non-parsed variables are still present.

http://www.ebokeh.com/index.php?x=link

Dkozikowski
01-02-2007, 09:08 PM
Try this and let me know if this is what you wanted:

grab_image_path.zip (http://www.dwilkinsjr.com/public/pixelpost/myaddons/grab_image_path_v0.2.zip)

Use the tag: <FULL_IMAGE_PATH>

This addon will display all images found in your database as non clickable links in a list format.

Dkozikowski
01-02-2007, 09:09 PM
i had a chance to try some more things here.....

.....I constructed the URL to be output as such:
<SITE_URL>images/<IMAGE_NAME>

This does output the correct URL when used in my image_template.html page, but again when i put these tags into the link_template.html it does not work. i just get "images/" displayed as that's the only static text. when viewing the page source the non-parsed variables are still present.

http://www.ebokeh.com/index.php?x=link

Install my above addon, place <FULL_IMAGE_PATH> in your link template and check it out.

Dkozikowski
01-02-2007, 09:20 PM
If the addon is not exactly what you wanted let me know how you want the links to display and i can change it for you.