PDA

View Full Version : Problem with Harmonious Stripe Addon


DanielH
01-24-2008, 05:53 PM
Hey there, i just installed the Harmonious Stripe Addon (http://www.pixelpost.org/extend/addons/harmonious-stripe-addon/) but can't get it work.
The Instructions say this:

1. Add admin_stripes to your addons directory
2. Add stripes directory to your pixelpost directory and make it writable.
3. Create stripes through the edit image menu by clicking on the Create Stripes submenu (next to EDIT POST). Choose vertical or horizontal and press the Create Histogram button. Stripe will appear below - you may need to reload your photoblog - NOT the admin panel if the image gets cached. Stripes are somewhat random, so if you don't like the results, click the Create Stripes button again.
4. Place <BGSTRIPES> on your image_template.html file to get the url to the stripe related to the current image.
5. If you want to use stripes on other non-image pages, you can use the <RANDOMSTRIPES> tag which will randomly choose one of the stripes you've already created.



Step 1-3 are done, but I doesnt understand step 4.
I tried to place the tag like this : <BODY background="<BGSTRIPES>" style="margin: 0px;">
but it doenst work.

I wonder at the Demo page of the developer is located in the /stripes folder, where i only got an empty index.html?

Any ideas?

dakwegmo
01-24-2008, 06:20 PM
Step 2 basically says you need to upload the stripes directory to your pixelpost root directory and make it writable. I.e if you have pixelpost installed at www.yoursite.com/pixelpost/ then you need to have a directory under the pixelpost directory called stripes. It also needs to be writeable by the web server.

Also, if you're using PP 1.7, did you remember to activate the addon?

DanielH
01-24-2008, 06:44 PM
Yes, the addon is activated and the folder exists, but i cant display it.
if i use "img src=<BGSTRIPES>" there's a small line with the colors appearing top of the page, but not the result i can see in the demo.
i think its about the index.html in the stripes folder, like the demo is located at http://pixelpost.kevincrafts.com/stripes/ and is idfferent to the normal version of this photoblog at http://pixelpost.kevincrafts.com/
what are you thinking?

kevincrafts
01-24-2008, 07:11 PM
If you want it tiled across the background like I did in the demo site, you can put something like this in your head tag:

<style>
body {
background-image:url(<BGSTRIPES>);
}
</style>

DanielH
01-24-2008, 07:22 PM
I've just written you another mail, with this content:

Your code doesn't work :(
I tried to put your code in image_tamplate.html and in browse_template.html, too but no effect.
Here's my photoblog, i use the suffocate template, too.
Do i have to put the whole software in the stripes folder like in your demopage?

dakwegmo
01-24-2008, 07:24 PM
Kevin's CSS suggestion is the best way to tile the image.

Don't get hung up on the fact that his demo is in the stripes folder, that's just the location of his PixelPost install for the stripes demo. He still has a subdirectory called stripes at http://pixelpost.kevincrafts.com/stripes/stripes/ that contains all of the background stripe images that get generated. (Note to Kevin, you may want to put your index.html in there, as it's showing a directory listing of said images).

If you could provide a link to your site that would be helpful. Without seeing the behavior though, it sounds like the problem you're having is with html, not with the addon. You wouldn't see anything with the "img src=<BGSTRIPES>" if the addon were the problem.

DanielH
01-24-2008, 07:26 PM
Here is the link to my photoblog: http://crux.hoohost.org/

dakwegmo
01-24-2008, 07:27 PM
Here's the problem

<style>
body {
background-image:url('%3CBGSTRIPES%3E');
}
</style>


Whatever application you're using to enter the code into your site is escaping the angle brackets. You need to edit the image_template.html in a plain text editor and replace this %3CBGSTRIPES%3E with this <BGSTRIPES>.

You also need to make sure you have an the html tag <body> in your template. The CSS above only applies the background to the body tag, and if it's not there, it can't apply the style.

DanielH
01-24-2008, 07:31 PM
Wooaahhh, nice, thank you!
I'd just wanted to edit this code quick so i just used frontpage, now i used Norepad++ and it's working :D

*edit*

I tested it with other of my templates, it works with most of them but not with delicious, maybe because of the css. i dont know

mrquick
02-23-2008, 06:40 PM
I'm a programming novice.
My problem is a little different.
I was trying to use the delicious 1.1 template.
I know the stripes addon is creating the stripes because I can see the stripes folder with the files.
I've tried it in the image_template file which didn't work so I then put it in the style sheet and it still didn't work.
Any ideas?

kevincrafts
02-25-2008, 08:24 PM
Can you post the code you've put in on your image_template.html file for me to look at?

froyt
04-25-2008, 09:30 AM
I'm a programming novice.
My problem is a little different.
I was trying to use the delicious 1.1 template.
I know the stripes addon is creating the stripes because I can see the stripes folder with the files.
I've tried it in the image_template file which didn't work so I then put it in the style sheet and it still didn't work.
Any ideas?

yeah same problem
my template to delicious 1.1 . but I try all template .nothing happend .
( sorry my english not good :)

kevincrafts
04-25-2008, 10:25 PM
I need a url to further troubleshoot this issue.

froyt
04-25-2008, 10:52 PM
I need a url to further troubleshoot this issue.

http://www.froyt.com/v3.0/index.php?showimage=57
or
http://www.froyt.com/v3.0/index.php?showimage=54

addon is creating the stripes I can see the stripes folder with the files.

froyt
04-28-2008, 09:58 PM
ok I give up

webby
02-05-2009, 01:19 PM
Great add-on, wonderful effects, thank you :)

DaveAdams
02-07-2009, 07:23 PM
ok I give up

Oh dear, so near and yet so far. IF you cannot get this addon working, here are a couple of extra steps that may help.

Copy the following into your index.php file, somewhere near the bottom will do (note -this is the same code that appears in the admin_stripes.php file)


// Background stripes
if((preg_match("<BGSTRIPES>", $tpl) && $image_id)) {
$filename = 'stripes/stripes_' . $image_name;
if (file_exists($filename)) {
$stripecss = 'stripes/' . $filename;
$tpl = str_replace("<BGSTRIPES>",$filename,$tpl);
} else {
$filename = '';
$tpl = str_replace("<BGSTRIPES>",$filename,$tpl);
}
}
if (preg_match("<RANDOMSTRIPE>", $tpl)) {
if ($handle = opendir('stripes')) {
while (false !== ($file = readdir($handle))) {
if ((strpos($file, '.jpg',1)) && (strlen($file) > 5)){
$files[] = $file;
}
}
closedir($handle);
}
$r = rand(0, count($files));
$filename = 'stripes/' . $files[$r];
$tpl = str_replace("<RANDOMSTRIPE>",$filename,$tpl);
}


NOTE: , I pasted it in at line 994, just after the following line in index.php $tpl = ereg_replace("<SITE_PHOTONUMBER>",$pixelpost_photonumb,$tpl);-

Then in your image_template.html, you need to put


<style type="text/css">
body {
"background-color":"black",
"background-image":"<SITE_URL><BGSTRIPES>",
"background-repeat":"repeat"
}
</style>


For some reason, adding the code into the index file helps, as does specifying the repeat option in the css.