View Full Version : New template from my blog
robackja
11-25-2008, 09:20 PM
I made my template (modified from treeswing.net), mostly uses mod_rewrite were possible without modifying any pixelpost code.
http://joeroback.com/downloads
robackja
11-25-2008, 09:23 PM
sorry, i should have note, I am having some issues with IE6/7 with my template, and i don't have access to a windows computer as of right now. I will try to resolve the issues later tonight.
currently, firefox (mac/linux), safari (mac) and opera seem to work fine.
jaywilliams
11-25-2008, 10:08 PM
Your template seems very clean and simple, and I love the mod_rewrite work. I'd highly recommend you post your template/adodn/hacks to the Extend section. That way It will get much more exposure.
Just go to: http://www.pixelpost.org/extend/admin/ and login with your forum username/password, and you will be able to upload the files.
robackja
11-25-2008, 10:10 PM
thanks. and yea, as soon as i work out the IE6/7 issues I will definitely post it there. I wanted to give a once-around here in the forums before posting it on the main site :)
kevincrafts
11-26-2008, 12:36 AM
How were you able to get the links on the archive page to output in your format without modifying any Pixelpost code?
robackja
11-26-2008, 01:17 AM
How were you able to get the links on the archive page to output in your format without modifying any Pixelpost code?
That's a good point, I should have made it clearer. paged_archive.php is a addon, I modified it so the thumbnails link to the mod_rewrite URLs, but the categories and dates on the left, still use the old URLs. I left all base pixelpost 1.7.1 code alone.
This is the kind of thing I wanted to work out before posting to the main site, so thanks for pointing this out.
I am going to try and clean up the "paged_archive" addon and bundle this all together with a readme (in one ZIP file)... and between sed, grep, and/or awk, I should be able to cleanup ALL the URLs in paged_archive.php rather quickly. I post back when I made the changes. and thanks again. i've been in-and-out of this template so much lately, I've forgotten things I've done (and haven't done)..
Scarabaeus
11-26-2008, 04:50 PM
I didn't realise the treeswing.net template was available? I think you've done a nice job but it's had some trouble loading the image fully.
robackja
11-26-2008, 05:28 PM
The treeswing template isn't *available* per se. I just copied the general layout using the same javascript for the comment hiding and the same/similar fonts.
at this point its heavily modified and my template is entirely XHTML 1.1 valid. but it was my starting point and i really admire Sean's work, that is why he is credited in my about page.
jaywilliams
11-27-2008, 05:30 PM
Hopefully Sean McKendall won't mind. :)
robackja
11-27-2008, 05:50 PM
Yea sean already visited and commented on a few of my photos, so I think it's ok. Imitation is the most sincere form flattery. :)
jaywilliams
11-27-2008, 08:18 PM
True, but I've found some people don't care for as much 'flattery' as others. :)
Either way, I do like your new template.
Dennis
11-28-2008, 12:28 PM
We have had some issues on the forum with people who basically copied a template and called it their own. However, these were 1-on-1 copies and clearly this isn't the case here.
Anyway, since Shawn has visited I think he's cool about it. Like Jay I like what you have done with it.
Scarabaeus
11-28-2008, 04:45 PM
Just to say the images on your blog never load with me - maybe something to do with the fade effect?
hicks0r
11-30-2008, 11:14 AM
I have a problem with this template, In that image the previous / next image inside the photo doesn't appear were they have to be
http://www.enricmoreno.com/p/8
What's the problem ?
Scarabaeus
11-30-2008, 03:20 PM
This isn't a readily available template is it??? If it is to use then it should be added to the extend section. Did you copy the code directly joeroback.com?
hicks0r
11-30-2008, 03:24 PM
I downloaded the 3 items from http://joeroback.com/downloads
Just installed the template, te addon (in addons direcotry and activate it) and finally the htaccess.
I use PixelPost versión: 1.7.1 in a clean installation.
Scarabaeus
11-30-2008, 09:04 PM
Ok it would be great to add to the pixelpost website so it's more readily available.
hicks0r
11-30-2008, 10:44 PM
The template still doesn't work in IE 6/7
Do you know when will be avaible an update for that issue.
Great tamplate adaptation for pixelpost.
Many thanks.
robackja
12-01-2008, 10:57 AM
The template still doesn't work in IE 6/7
Do you know when will be available an update for that issue.
Try http://joeroback.com now. I updated the javascript libraries and my fade javascript to hopefully work with IE6/7. I also added an IE6/7 CSS style sheet to deal with the 3 or 4 IE quarks. http://joeroback.com/downloads, I packaged it up in ZIP and bz2, but I made the ZIP in OSX and it won't open for me under XP SP3 for whatever reason.
I also fixed the next/prev overlays not aligning up with image when its a portrait oriented image. please, browse around and let me know how it works for you.
mod_rewrite changes are still only partial. I still need to go through paged_archived.php addon and replace all the URLs with mod_rewrite versions. theoretically, i would love to add mod_rewrite URLs as an option to the paged_archive addon, but i am unsure of my time and how long it will take me.
I also had to modify my index.php to output xhtml HTTP headers (not necessary)... but I replaced
header('Content-Type: text/html; charset=utf-8');
with
header('Vary: Accept');
if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') === FALSE) {
header('Content-Type: text/html; charset=utf-8');
}
else {
header('Content-Type: application/xhtml+xml; charset=utf-8');
echo('<?xml version="1.0" encoding="UTF-8"?>'."\n");
}
I really wish there was an option in the ADMIN page which had a drop with HTML and XHTML (xhtml1.0,xhtml1.1) in it, and then index.php would output the correct headers. I pretty sure though I can accomplish this in my apache config or .htaccess, but i haven't figured it that out yet.
hicks0r
12-01-2008, 10:33 PM
I updated my installation, for now all is ok, let me test it I report you in a few days.
robackja
12-01-2008, 11:05 PM
I updated my installation, for now all is ok, let me test it I report you in a few days.
I just did some minor tweaks with regard to CSS, added README.txt. I now consider the javascript/CSS in final stages. I will work on modifications for full mod_rewrite in paged archive addon next.
http://joeroback.com/downloads
hicks0r
12-01-2008, 11:43 PM
I download the last version. I have one more question, take a look at this page
http://www.enricmoreno.com/p/3
The photo is in "panoramic format", and the date and info+comment appears so down, it's possible when I publish that kinf of photos the text was under the image like when I post normal size images ?
And about xhtml HTTP headers what they do ?
robackja
12-02-2008, 01:12 AM
Yea I accidentally hard coded a 480px height in the style sheet. I fix it layer tonight when I get home :)
robackja
12-02-2008, 02:06 AM
Yea I accidentally hard coded a 480px height in the style sheet. I fix it layer tonight when I get home :)
Ok, fixed. http://joeroback.com/downloads. All you really need is the joeroback.css file or remove the min-height: 480px; line from it.
The site is designed though for images that are 720px wide, but will work with anything smaller than 720px... but the main content is statically divided into a 720px area BY design.
robackja
12-02-2008, 09:28 AM
Ok, I hacked up paged_archive.php for full mod_rewrite support. Modified version read a variable $cfgrow['mod_rewrite'], if true, produces mod_rewrite friendly URLs, if false, produces previous URLs.
http://joeroback.com/downloads
It would be nice to get a mod_rewrite option in the main admin options page.
Need these following RewriteRules in your htaccess or apache config:
RewriteRule ^(about|downloads)/?$ index.php?x=$1
RewriteRule ^browse/?$ index.php?x=browse
RewriteRule ^browse/([1-9][0-9]*)/?$ index.php?x=browse&pagenum=$1
RewriteRule ^browse/category/([1-9][0-9]*)/?$ index.php?x=browse&category=$1
RewriteRule ^browse/category/([1-9][0-9]*)/([1-9][0-9]*)/?$ index.php?x=browse&category=$1&pagenum=$2
RewriteRule ^browse/archive/(19|20)([0-9][0-9])[-](0[1-9]|1[012])/monthname/([^/]+)/?$ index.php?x=browse&archivedate=$1$2-$3&monthname=$4
RewriteRule ^browse/archive/(19|20)([0-9][0-9])[-](0[1-9]|1[012])/monthname/([^/]+)/([1-9][0-9]*)/?$ index.php?x=browse&archivedate=$1$2-$3&monthname=$4&pagenum=$5
RewriteRule ^browse/tag/([^/]+)/?$ index.php?x=browse&tag=$1
RewriteRule ^browse/tag/([^/]+)/([1-9][0-9]*)/?$ index.php?x=browse&tag=$1&pagenum=$2
RewriteRule ^comment/submit$ index.php?x=save_comment
RewriteRule ^comment/([0-9]+)$ index.php?popup=comment&showimage=$1
RewriteRule ^(p|photo)/([0-9]+)$ index.php?showimage=$2
RewriteRule ^(p|photo)/([0-9]+)/rating/([1-5])$ index.php?showimage=$2&rating=$3
RewriteRule ^t/latest/?$ index.php?showthumb=latest&thumbtag=image
RewriteRule ^feeds/(rss|atom).xml$ index.php?x=$1
jaywilliams
12-02-2008, 05:13 PM
Now get that code on Extend. :)
robackja
12-02-2008, 07:31 PM
I put both the paged_archive mod as a single addon and the template on Extend.
hicks0r
12-02-2008, 08:08 PM
One more question, it's possible to have diferent page title?
I use that in the head
<title>enricmoreno dot com | <IMAGE_TITLE> | Image No. <IMAGE_ID></title>
That's OK when I'm on image_template.php but don't word (obviously) in te about or browse.
Any way to resolve it ?
robackja
12-02-2008, 08:14 PM
One more question, it's possible to have diferent page title?
I use that in the head
<title>enricmoreno dot com | <IMAGE_TITLE> | Image No. <IMAGE_ID></title>
That's OK when I'm on image_template.php but don't word (obviously) in te about or browse.
Any way to resolve it ?
Well the TAGs <IMAGE_TITLE> and <IMAGE_ID> are only defined in the image_template.html page. You can in Javascript, in the window.onload function, have it update the title.
window.onload = function() {
document.title = document.title + ' | <IMAGE_TITLE> | Image No. <IMAGE_ID>';
var img = document.getElementById('photo');
img.onload = function(evt) {
// using custom fader since Effect.Appear() from scriptaculous
// lacks a few things:
// (1) callback function to do something when appear effect completes
// (2) work with visibility style instead of display
fade(img, 0.5, 10, fadeCallback);
}
// set img src
img.src = 'http://joeroback.com/images/20081130190138__mg_5130.jpg';
};
I don't know of any other way to have a custom title for just the image_template page without some sort-of complicated addon.
mckendall
12-05-2008, 06:54 PM
I've got to stop by here more often. Seems like there's a lot I'm missing out on. As for the template, I don't mind at all, Joe. Nice work...really.
Matthias70
12-07-2008, 09:47 AM
Hi Joe,
I'm totally new to pixelpost. Your great theme is one of the reasons why I'm using it :-)
One question to your mod rewrite:
At the moment my urls with mod rewrite look like this
photoblog/p/1
photoblog/p/2
Is there a way to use mod rewrite, so urls would be like this?
photoblog/categoryname/imagename
Thanks
Matthias
robackja
12-07-2008, 02:13 PM
Hi Joe,
I'm totally new to pixelpost. Your great theme is one of the reasons why I'm using it :-)
One question to your mod rewrite:
At the moment my urls with mod rewrite look like this
photoblog/p/1
photoblog/p/2
Is there a way to use mod rewrite, so urls would be like this?
photoblog/categoryname/imagename
Thanks
Matthias
I think it has to do with the rewrite base. under RewriteEngine On in your htaccess, try putting this
RewriteBase /photoblog/
and let me know if that works for you or not.
Matthias70
12-07-2008, 05:11 PM
Hi Joe,
below you can see the htacces file.
RewriteBase /photoblog/ does not change anything.
Is an imagelink like
photoblog/nature/flower1
supported by your theme.
I read the forum and found some threads about a slug plugin.
Unfortunatley its only for pixelpost 1.5
Thanks
Matthias
RewriteEngine on
RewriteBase /photoblog/
RewriteRule ^(about|downloads)/?$ index.php?x=$1
RewriteRule ^browse/?$ index.php?x=browse
RewriteRule ^browse/([1-9][0-9]*)/?$ index.php?x=browse&pagenum=$1
RewriteRule ^browse/category/([1-9][0-9]*)/?$ index.php?x=browse&category=$1
RewriteRule ^browse/category/([1-9][0-9]*)/([1-9][0-9]*)/?$ index.php?x=browse&category=$1&pagenum=$2
RewriteRule ^browse/archive/(19|20)([0-9][0-9])[-](0[1-9]|1[012])/monthname/([^/]+)/?$ index.php?x=browse&archivedate=$1$2-$3&monthname=$4
RewriteRule ^browse/archive/(19|20)([0-9][0-9])[-](0[1-9]|1[012])/monthname/([^/]+)/([1-9][0-9]*)/?$ index.php?x=browse&archivedate=$1$2-$3&monthname=$4&pagenum=$5
RewriteRule ^browse/tag/([^/]+)/?$ index.php?x=browse&tag=$1
RewriteRule ^browse/tag/([^/]+)/([1-9][0-9]*)/?$ index.php?x=browse&tag=$1&pagenum=$2
RewriteRule ^comment/submit$ index.php?x=save_comment
RewriteRule ^comment/([0-9]+)$ index.php?popup=comment&showimage=$1
RewriteRule ^(p|photo)/([0-9]+)$ index.php?showimage=$2
RewriteRule ^(p|photo)/([0-9]+)/rating/([1-5])$ index.php?showimage=$2&rating=$3
RewriteRule ^t/latest/?$ index.php?showthumb=latest&thumbtag=image
RewriteRule ^feeds/(rss|atom).xml$ index.php?x=$1
robackja
12-07-2008, 06:40 PM
oh my gosh. i totally read your first post wrong. i was simultaneously answering an email that was related to RewriteBase and blindly replied to your msg. sorry about that.
What you are asking cannot be done without either having installed slug or modifying index.php. (I'm not sure exactly how slug does it, maybe they also modify index.php, never really looked into it)... but the 5 min howto would look like this (and i don't know how knowledgeable you are in web/php/mysql stuff)
Add a rewrite rule like this
RewriteRule ^photoblog/([^/]+)/([^/]+) index.php?showtitle=$2
I am not sure why you would put 'categoryname' in the URL, since it would have no purpose in the query, maybe just for a more informative URL?
Then you would have to modify index.php to select from database based on image title, instead of image id
// Get Current Image.
if(!isset($_SESSION["pixelpost_admin"]))
{
if(!isset($_GET['showtitle']) || $_GET['showtitle'] == "")
{
$row = sql_array("SELECT * FROM `".$pixelpost_db_prefix."pixelpost` WHERE `datetime` <= '$cdate' ORDER BY ".$cfgrow['display_sort_by']." ".$display_order." LIMIT 0,1");
}
else
{
$row = sql_array("SELECT * FROM `".$pixelpost_db_prefix."pixelpost` WHERE (`headline` = '".$_GET['showtitle']."') AND `datetime` <= '$cdate'");
}
}
else
{
if(!isset($_GET['showtitle']) || $_GET['showtitle'] == "")
{
$row = sql_array("SELECT * FROM `".$pixelpost_db_prefix."pixelpost` ORDER BY ".$cfgrow['display_sort_by']." ".$display_order." LIMIT 0,1");
}
else
{
$row = sql_array("SELECT * FROM `".$pixelpost_db_prefix."pixelpost` WHERE (`headline` = '".$_GET['showtitle']."')");
}
}
And that needs to be placed next to the similar code that uses $_GET['showimage'] instead of $_GET['showtitle']. Again, having tested any of this, and i am just writing off the top of my head.
Matthias70
12-07-2008, 06:56 PM
oh my gosh. i totally read your first post wrong. i was simultaneously answering an email that was related to RewriteBase and blindly replied to your msg. sorry about that.
;-) That is what I thought
I just asking this for SEO! I'm using wordpress for my blog and there it is standard to have URLs like the post title...
I thought your template with mod_rewrite would do the same.
So I think I have to wait like others in this thread
http://www.pixelpost.org/forum/showthread.php?t=4915
Would be great to have this feature as standard in pixelpost.
Thanks
Matthias
robackja
12-07-2008, 07:03 PM
I thought your template with mod_rewrite would do the same.
So I think I have to wait like others in this thread
http://www.pixelpost.org/forum/showthread.php?t=4915
yea, i just looked at it and slug addon actually modifies index.php for you. it also formats the title a little neater, removing any weird characters, etc.
and i would totally agree, slug (image title) and mod_rewrite URLs would be a great addition to pixelpost. I am currently running the SVN version of PP on my development server and looking into adding mod_write as a standard option in PP, but it close of end-of-semester and right now my time is short for play stuff like pixelpost :)
Matthias70
12-07-2008, 07:09 PM
and i would totally agree, slug (image title) and mod_rewrite URLs would be a great addition to pixelpost. I am currently running the SVN version of PP on my development server and looking into adding mod_write as a standard option in PP, but it close of end-of-semester and right now my time is short for play stuff like pixelpost :)
Hi Joe,
great, I can wait ;-)
Thanks
Matthias
jaywilliams
12-08-2008, 03:38 AM
Hey, if you want to merge my slug addon into your addon and/or Pixelpost feel free. :)
hicks0r
12-08-2008, 06:52 PM
One more question, How I link to a category in the image_template page, I put the category related to an image in the EXIF info of the photo, but when I click over it, the direction is wrong, I supposed it's becouse the mod_rewrite...
Can you help me ...
Try this http://www.enricmoreno.com/ push over the categorie down the EXIF info.
Thanks
robackja
12-08-2008, 07:10 PM
One more question, How I link to a category in the image_template page, I put the category related to an image in the EXIF info of the photo, but when I click over it, the direction is wrong, I supposed it's becouse the mod_rewrite...
unfortunately, mod_rewrite is a giant hack currently in Pixelpost. Proper support needs to be added in future releases. To make those links use mod_write URLs, you have to modify index.php. You need to replace this line:
$image_category_all .= "<a href='".PHP_SELF."?x=browse&category=$cat_id'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
$image_category_all_paged .= "<a href='".PHP_SELF."?x=browse&category=$cat_id&pagenum=1'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
with this
$image_category_all .= "<a href='".PHP_SELF."browse/category/$cat_id'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
$image_category_all_paged .= "<a href='".PHP_SELF."/browse/category/$cat_id/1'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
Also I noticed on your site, that the 'browse' page is not using mod_rewrite URLs. You need to replace your paged_archive.php addon with the one provided in the ZIP file. And then make sure using ADMIN interface that mod_rewrite URLs are enabled in the ADDON section.
hicks0r
12-08-2008, 07:36 PM
unfortunately, mod_rewrite is a giant hack currently in Pixelpost. Proper support needs to be added in future releases. To make those links use mod_write URLs, you have to modify index.php. You need to replace this line:
$image_category_all .= "<a href='".PHP_SELF."?x=browse&category=$cat_id'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
$image_category_all_paged .= "<a href='".PHP_SELF."?x=browse&category=$cat_id&pagenum=1'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
with this
$image_category_all .= "<a href='".PHP_SELF."browse/category/$cat_id'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
$image_category_all_paged .= "<a href='".PHP_SELF."/browse/category/$cat_id/1'>" .$cfgrow['catgluestart'] .$name .$cfgrow['catglueend']."</a> ";
Also I noticed on your site, that the 'browse' page is not using mod_rewrite URLs. You need to replace your paged_archive.php addon with the one provided in the ZIP file. And then make sure using ADMIN interface that mod_rewrite URLs are enabled in the ADDON section.
Don't worry about hack index.php I just reuploaded the paged_archive.php and enabled the mod_rewrite and ALL IS OK, I don't need to hack the index.php.
I was using the first version of your template :)
Many thanks for your quickly answer
robackja
12-21-2008, 07:53 PM
So yeah, I'm incredibly confused and looking for any ounce of help anyone could offer. I think this template is a reeaaallly nice looking one and I'd love to get it to work if possible.
usually the problem you are describing has nothing to do with the .htaccess file. that usually happens if you have your SITE URL in the ADMIN options set incorrectly.
but without a link to your blog, its impossible to guess what the problem might be...
amysaurusrex
12-21-2008, 08:53 PM
Apologies, my mistake.
Site is here (http://www.zeitgeisting.com).
Got the template working for the front page, but the other pages aren't. The addon is installed and on, so I'm not sure why it's not working correctly.
robackja
12-21-2008, 08:58 PM
Apologies, my mistake.
Site is here (http://www.zeitgeisting.com).
Got the template working for the front page, but the other pages aren't. The addon is installed and on, so I'm not sure why it's not working correctly.
When you receive a 404 error on a mod_rewrite URL, its because the htaccess file is not working.
the file starts with a dot `.htaccess` and should placed in the root of the pixelpost installation.
if the pixelpost document root was /home/ppuser/htdocs/photoblog, the file should be /home/ppuser/htdocs/photoblog/.htaccess
Also in order to use .htaccess files, Apache has to be configured "AccessFileName" option (apache 2.0 docs (http://httpd.apache.org/docs/2.0/mod/core.html#accessfilename)) and have mod_rewrite installed. You will have to verify with your hosting company if they allow htaccess files and mod_rewrite. (almost all do)
robackja
12-21-2008, 09:02 PM
Also the template is designed for photos sized 720px width max, if you want to use larger sizes, you need to replace all occurrences of 720px in the CSS file with whatever size you want to use.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.