View Full Version : Previews \ Next: turning it around?
boffers
01-23-2007, 09:53 PM
Hi everyone,
I am using Pixelpost for some time now and I have a question regarding the way visitors view the website. My blog can be found at http://www.offersphoto.com - The the newest picture, is ofcourse on the homepage: you have to click on previous to go to the 'next' picture. Also, the newest thumbnails are showing at the rightside of the bottom of the page. (oldest <------> newest)
I analysed the traffic by Google Analytics and it is pretty suprising that people click Next on the first page (I have the photoslug addon, didn't fully integrate this into the <IMAGE_NEXT_LINK), while there is no photo on that link because they should click the previous link. Visitors click the Next link more than four times as much as the previous link. Also, the thumbnails on the left side (older ones) are clicked more.
I am therefore thinking about switching the previous and next link. Does anyone have experience in the effect in doing this? Or how should I fix this?
I think lot's of visitors will leave the website when they click on Next and still see the same image (because it goes to the root: www.offersphoto.com).
Thanks in advance!
Dkozikowski
01-23-2007, 11:00 PM
just replace your next link with <IMAGE_PREVIOUS_SLUG> and your previous link with <IMAGE_NEXT_SLUG>
That should work.
m i k e b
01-24-2007, 01:21 PM
boffers, funny you mention this. i had not thought much about it until recently when i was visiting a college professor (photography) who wanted to see my work. immediately i noticed they had trouble grasping why "next" did not show them the next image they wanted to see. i must have had to tell her three or four times that she had to click previous to view the previous day's photo.
the method makes sense to me as i am sure it does to most bloggers, but i realized there are two different worlds out there that is for sure.
austriaka
01-24-2007, 03:10 PM
the method makes sense to me as i am sure it does to most bloggers, but i realized there are two different worlds out there that is for sure.
That's the reason why I use calendar in image page. I played around with calendar css (and a little bit on addon as well), so the "timeline" of the blog should be eyecatching enough to make "previous" and "next" senseful
;-)
KArin
boffers
01-24-2007, 05:15 PM
@dwilkinsjr: I did this, but the only problem is that the link is also showing when there is no next or previous image. On the homepage this is quite important.
@m i k e b: yes, that is exactly what I mean. People who know the software of Pixelpost (lot's of photographers and therefore some of my visitors) would click on previous. But I also have people who don't know this software, who are obiously clicking on the next link first.
Are there any people who also have the previous AND next link on their homepage and can also track this in a statsitcs program?
If not, I would like to know what the visitors are often clicking in the thumbnails: left or right side? If you use Google Analytics, you can easily see this by using "Site Overlay".
Thanks in advance!
Dkozikowski
01-24-2007, 06:07 PM
@dwilkinsjr: I did this, but the only problem is that the link is also showing when there is no next or previous image. On the homepage this is quite important.
Are you saying you do not want your previous link to show when there is no previous image and the same for next?
Currently your website displays both next and previous links at the same time and thats due to how your have your links set up.
In your source code your links look like this
<A href="/<IMAGE_PREVIOUS_SLUG>"><< Previous</a>
and
<A href="/<IMAGE_NEXT_SLUG>">Next >></a>
What you need to do is replace all of this:
<A href="/<IMAGE_PREVIOUS_SLUG>"><< Previous</a>
with this:
<IMAGE_NEXT_LINK_SLUG>
and, replace all of this:
<A href="/<IMAGE_NEXT_SLUG>">Next >></a>
with this:
<IMAGE_PREVIOUS_LINK_SLUG>
and edit your language file where it says $lang_previous_slug and $lang_next_slug to this:
$lang_previous_slug = "Next >>"; // SLUG ADDON
$lang_next_slug = "<< Previous"; // SLUG ADDON
boffers
01-24-2007, 07:34 PM
Thanks, I changed that. Is there also a way I can have it http://www.offersphoto.com/wild-and-rocky-coast-great-ocean-road-australia
instead of: http://www.offersphoto.com/index.php?photoslug=wild-and-rocky-coast-great-ocean-road-australia ?
You wouldn't also happen to know how I can fix the thumbnails with a slug, so my categories in the gallery also still work, right? (I checked this some time ago with a solution I read in the slug topic, but my gallery didn't work after that).
I am still interested what other people think about the Next/Previous...
austriaka
01-24-2007, 07:45 PM
If you use GeoS Show Category ADDON you can use his previous and next links:
<SC_IMAGE_PREVIOUS_LINK><SC_IMAGE_PREVIOUS_LINK_TXT></a>
and
<SC_IMAGE_NEXT_LINK><SC_IMAGE_NEXT_LINK_TXT></a>
With that there is no "next" if there is no next image and no "previous" if no previous image
KArin
Dkozikowski
01-24-2007, 07:52 PM
Thanks, I changed that. Is there also a way I can have it http://www.offersphoto.com/wild-and-rocky-coast-great-ocean-road-australia
instead of: http://www.offersphoto.com/index.php?photoslug=wild-and-rocky-coast-great-ocean-road-australia ?
Yes, you can do this by using mod_rewrite by utilizing a .htaccess file
This is what my .htaccess file looks like:
RewriteEngine On
# Post Slug Addon
RewriteRule ^([a-z0-9-]+)$ index.php?photoslug=$1
You wouldn't also happen to know how I can fix the thumbnails with a slug, so my categories in the gallery also still work, right? (I checked this some time ago with a solution I read in the slug topic, but my gallery didn't work after that).
I am still interested what other people think about the Next/Previous...
There is a way to do this. I spoke privately with the post slug author to get this working because the source code that was provided in the post slug thread was incomplete. I would love to help you but I do not remember all the changes that were made.
My suggestion to you would be to get in touch with the addon author and see if they are willing to help you out.
boffers
01-24-2007, 08:39 PM
dwilkinsjr: I have it the same as you do:
RewriteEngine On
# Post Slug Addon
RewriteRule ^([a-z0-9-]+)$ index.php?photoslug=$1
When clicking on a image, it shows like .... .com/titleofphoto. When clicking on the next button it looks like ..... . com/index.php?photoslug=titleofphoto. Any idea?
I will contact the Slug addon writer, thanks for the tip!
Dkozikowski
01-24-2007, 09:08 PM
Ahh, yes. I forgot. I modified the original addon to fix this.
Try this and let me know if it works.
!!!Please make a backup of admin_PostSlug.php before you continue!!!
Open admin_PostSlug.php, find the following lines and make the changes:
Find on line 631:
$image_previous_link_slug = "<a href='$slugprefix$image_previous_slug'>$lang_previous</a>";
Replace with:
$image_previous_link_slug = "<a href='/$image_previous_slug'>$lang_previous_slug</a>"; // Modified by Dwilkinsjr
- and -
Find on line 649:
$image_next_link_slug = "<a href='$slugprefix$image_next_slug'>$lang_next</a>";
Replace with:
$image_next_link_slug = "<a href='/$image_next_slug'>$lang_next_slug</a>"; // Modified by Dwilkinsjr
jaywilliams
01-24-2007, 10:09 PM
I've had quite a few requests for help with integrating mod_rewrite with the PostSlug Addon.
So now, due to popular request, I now have a new version designed exclusively for use with mod_rewrite.
Just download it, and follow the short list of instructions found in the readme file, and you should be good to go.
PostSlug_1.0.1_beta_modrewrite.zip (http://labs.dview.us/other_files/files/PostSlug_1.0.1_beta_modrewrite.zip)
Enjoy!
P.S. This version also modifies the RSS & ATOM feed so they use Post Slug too!
Dkozikowski
01-24-2007, 10:35 PM
Good work Jay. This will make it easier on all of us :cool:
boffers
01-26-2007, 02:00 PM
Thank you so much all!
I only have one more thing I need to change and I do not know who can help me here: a Photosug expert or a Geos_Show_Category expert. I am using the <SC_THUMB_ROW> because I am using this for: http://bas.offersphoto.com - It only needs to show thumbnails on the first page only of one specific category. The links are still working with ID's: I would like to change this in a photoslug link. Can anyone help with this?
The last thing I need to do is changig the Google Map links to the photos: they are using ID's as well.
Furthermore I am still interested in the discussion I actually wanted to start ;-)
Dkozikowski
01-26-2007, 02:08 PM
I have never used Geos's show cat addon but i'll have a look. it should be real simple. I'll report my findings soon. No promises though :p
Dkozikowski
01-26-2007, 02:21 PM
Ok, please make a backup before you do anything! This has not been tested!!! I'm hoping it works :)
find the following on line 454:
/************************************************** *********************************
*
* thumbnails row for image_template
*
************************************************** *********************************/
Replace everything bellow with this:
if($sc_th_row == 1)
{
$category = 0;
$aheadlimit = round(($cfgrow['thumbnumber']-1)/2);
$behindlimit = round(($cfgrow['thumbnumber']-1)/2);
if($cfgrow['thumbnumber']%2==0) $cfgrow['thumbnumber']++;
if(isset($_GET["category"]) && is_numeric($_GET["category"]))
{
$sql9 = "SELECT COUNT(p.id) AS count FROM ".$pixelpost_db_prefix."pixelpost AS p, ".$pixelpost_db_prefix."catassoc AS c WHERE (p.datetime > '$image_datetime') AND (p.datetime<='$cdate') AND (p.id = c.image_id) AND (c.cat_id = ".$_GET["category"].")";
$sql10 = "SELECT COUNT(p.id) AS count FROM ".$pixelpost_db_prefix."pixelpost AS p, ".$pixelpost_db_prefix."catassoc AS c WHERE (p.datetime < '$image_datetime') AND (p.datetime<='$cdate') AND (p.datetime<='$cdate') AND (p.id = c.image_id) AND (c.cat_id = ".$_GET["category"].")";
$category = 1;
$cat_ow = '&category='.$_GET["category"];
}
else
{
$sql9 = "SELECT COUNT(id) AS count FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime > '$image_datetime') AND (datetime<='$cdate')";
$sql10 = "SELECT COUNT(id) AS count FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime < '$image_datetime') AND (datetime<='$cdate')";
$cat_ow = '';
}
$aheadnumb = sql_array($sql9);
$behindnumb = sql_array($sql10);
$aheadnumb = $aheadnumb['count'];
$behindnumb = $behindnumb['count'];
if($aheadnumb <= $aheadlimit)
{
$behindlimit = ($cfgrow['thumbnumber']-1)-$aheadnumb;
$aheadlimit = $aheadnumb;
}
if($behindnumb <= $behindlimit)
{
$aheadlimit = ($cfgrow['thumbnumber']-1)-$behindnumb;
$behindlimit = $behindnumb;
}
$ahead_thumbs = "";
$ahead_thumbs_reverse = "";
$behind_thumbs = "";
$behind_thumbs_reverse ="";
if($category == 0)
{
$sql11 = "SELECT id,headline,image,slug FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime > '$image_datetime') AND (datetime<='$cdate') ORDER BY datetime asc limit 0,$aheadlimit";
}
else
{
$sql11 = "SELECT p.id,p.headline,p.image,p.slug FROM ".$pixelpost_db_prefix."pixelpost AS p, ".$pixelpost_db_prefix."catassoc AS c WHERE (p.datetime > '$image_datetime') AND (p.datetime<='$cdate') AND (p.id = c.image_id) AND (c.cat_id = ".$_GET["category"].") ORDER BY p.datetime asc limit 0,$aheadlimit";
}
$thumbs_ahead = mysql_query($sql11);
while(list($id,$headline,$image,$slug) = mysql_fetch_row($thumbs_ahead))
{
$headline = pullout($headline);
$headline = htmlspecialchars($headline,ENT_QUOTES);
list($local_width,$local_height) = getimagesize("thumbnails/thumb_$image_name");
$ahead_thumbs .= "<a href='$slug$cat_ow' class='gsc_thumb_row'><img src='thumbnails/thumb_$image' alt='$headline' title='$headline' class='thumbnails' width='$local_width' height='$local_height' /></a>";
$ahead_thumbs_reverse = "<a href='$slug$cat_ow' class='gsc_thumb_row'><img src='thumbnails/thumb_$image' alt='$headline' title='$headline' class='thumbnails' width='$local_width' height='$local_height' /></a>" .$ahead_thumbs_reverse ;
}
if($category == 0)
{
$sql12 = "SELECT id,headline,image,slug FROM ".$pixelpost_db_prefix."pixelpost WHERE (datetime < '$image_datetime') AND (datetime<='$cdate') ORDER BY datetime desc limit 0,$behindlimit";
}
else
{
$sql12 = "SELECT p.id,p.headline,p.image,p.slug FROM ".$pixelpost_db_prefix."pixelpost AS p, ".$pixelpost_db_prefix."catassoc AS c WHERE (p.datetime < '$image_datetime') AND (p.datetime<='$cdate') AND (p.id = c.image_id) AND (c.cat_id = ".$_GET["category"].") ORDER BY p.datetime desc limit 0,$behindlimit";
}
$thumbs_behind = mysql_query($sql12);
while(list($id,$headline,$image,$slug) = mysql_fetch_row($thumbs_behind))
{
$headline = pullout($headline);
$headline = htmlspecialchars($headline,ENT_QUOTES);
list($local_width,$local_height) = getimagesize("thumbnails/thumb_$image_name");
$behind_thumbs = "<a href='$slug$cat_ow' class='gsc_thumb_row'><img src='thumbnails/thumb_$image' alt='$headline' title='$headline' class='thumbnails' width='$local_width' height='$local_height' /></a>$behind_thumbs";
$behind_thumbs_reverse .= "<a href='$slug$cat_ow' class='gsc_thumb_row'><img src='thumbnails/thumb_$image' alt='$headline' title='$headline' class='thumbnails' width='$local_width' height='$local_height' /></a>";
}
list($local_width,$local_height) = getimagesize("thumbnails/thumb_$image_name");
$sc_thumb_row = "$behind_thumbs<a href='$slug$cat_ow' class='gsc_thumb_row'><img src='thumbnails/thumb_$image_name' alt='$image_title' title='$image_title' class='current-thumbnail' width='$local_width' height='$local_height' /></a>$ahead_thumbs";
$sc_thumb_row_rev = "$ahead_thumbs_reverse<a href='$slug$cat_ow' class='gsc_thumb_row'><img src='thumbnails/thumb_$image_name' alt='$image_title' title='$image_title' class='current-thumbnail' width='$local_width' height='$local_height' /></a>$behind_thumbs_reverse";
}
Do not delete / modify / or replace the following!!!
$tpl = str_replace("<SC_IMAGE_PREVIOUS_ID>",$sc_previous_id,$tpl);
$tpl = str_replace("<SC_IMAGE_PREVIOUS_NAME>",$sc_previous_name,$tpl);
$tpl = str_replace("<SC_IMAGE_PREVIOUS_TITLE>",$sc_previous_title,$tpl);
$tpl = str_replace("<SC_IMAGE_PREVIOUS_DATETIME>",$sc_previous_datetime,$tpl);
$tpl = str_replace("<SC_IMAGE_PREVIOUS_DATETIME_FORM>",$sc_previous_datetime_form,$tpl);
$tpl = str_replace("<SC_IMAGE_PREVIOUS_LINK>",$sc_previous_link,$tpl);
$tpl = str_replace("<SC_IMAGE_PREVIOUS_LINK_TXT>",$sc_previous_link_txt,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_ID>",$sc_next_id,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_NAME>",$sc_next_name,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_TITLE>",$sc_next_title,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_DATETIME>",$sc_next_datetime,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_DATETIME_FORM>",$sc_next_datetime_form,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_LINK>",$sc_next_link,$tpl);
$tpl = str_replace("<SC_IMAGE_NEXT_LINK_TXT>",$sc_next_link_txt,$tpl);
$tpl = str_replace("<SC_CAT_ID>",$sc_cat_id,$tpl);
$tpl = str_replace("<SC_CAT_NAME>",$sc_category,$tpl);
$tpl = str_replace("<SC_BROWSE_CATEGORY>",$sc_browse_category,$tpl);
$tpl = str_replace("<SC_THUMBNAILS>",$sc_thumb_output,$tpl);
$tpl = str_replace("<SC_THUMBNAILS_NAV>",$sc_thumb_nav,$tpl);
$tpl = str_replace("<SC_THUMB_ROW>",$sc_thumb_row,$tpl);
$tpl = str_replace("<SC_THUMB_ROW_REV>",$sc_thumb_row_rev,$tpl);
?>
boffers
01-26-2007, 07:53 PM
Thanks a lot: it is working now! The only thing I changed: I took $cat_ow out of the links. I got an error. For me it is most important the first page of the category works good, it doesn't matter that when you do click on something and go to an other photo, thumbnails are shown that are not from this category. So now it works as I hoped! Thanks a lot!
Dkozikowski
01-26-2007, 09:27 PM
Thats great to hear! Enjoy.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.