ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Setting up a photoblog

June 28, 2007 2:22pm

Subscribe [1]
  • #1 / Jun 28, 2007 2:22pm

    stevem

    5 posts

    Hello.

    I’m trying to setup a photoblog using the stand weblog module.

    I’m using my primary weblog, including its existing fields, but have added another category, photo_blog_1.  I’ll upload the image and place the link to it in the body.  So far so good. However I"d like to be able to set it up so that when the user clicks on the image it takes them to the previous blog entry that is in the photo_blog_1 category. Can anyone think of a way to do this.

    Also, I’d like to be able to use next and previous links, but can’t seem to get them working, even when I put them outside of the exp:weblog:entries tag.  I’m using exp:weblog:entries limit=“1” category=“80” to pull out my individual weblog entries… Is this the correct way to create a single entry page?

    Thanks,

    Stevem

  • #2 / Jun 28, 2007 2:57pm

    Lisa Wess

    20502 posts

    Greetings, Steve.

    I may end up moving this to how-to, but for now I want to look at the next/previous links.  What version and build of EE are you using?  I would not use the category= in the single entry page, as it will cause problems pulling the entries via the URL. If you remove that, does it work?  What is the code for the template that you have now, and in what way is the next/prev night working?

    I also didn’t follow your first question - when you click the image link you want it to bring up the picture of the entry before?

  • #3 / Jun 28, 2007 3:08pm

    stevem

    5 posts

    Hi Lisa!

    Thanks for the quick response

    What I’m trying to achieve is best demonstrated by a site that is working:

    http://www.seekingfocus.com/photo/

    Of course I want to make some changes to what this person is doing, but the basic idea of one photo per page, and clicking on the photo takes the user to the next photo is what I want.  I’m thinking each photo would be a a unique weblog entry.

    Regarding the next/previous: The tags are simply being ignored. Even the “Next entry” text isn’t being displayed. I can try to set them up without the category in the web:weblog:entries tag, but that will mean that categories I don’t want will be displayed on my photoblog page.

    I’m using EE 1.5.2 (need to upgrade to 1.6 for category next/previous).

    Thanks again!

    stevem

  • #4 / Jun 28, 2007 3:11pm

    Lisa Wess

    20502 posts

    Well, I can’t really say I *like* that behavior - if I click a picture, I expect a bigger, higher resolution one to pop up. =)

    The “next” and “previous” link will only show up if there is a next or previous image.  Can you post your template before we proceed, please?  thank you.

  • #5 / Jun 28, 2007 3:16pm

    stevem

    5 posts

    Here’s the page: http://www.shooter.net/index.phpg/photo_blog_1

    I hear ya about wanting bigger photos when clicked, but the photoblog world seems to like the click for next photo arrangement… And that is the audience this would be for. I’ve got plenty of thumbnail/larger image galleries on my site… Just click the galleries link on the pagelisted above…

    Anyways, here’s my code. I’ve tweaked and cranked and not been able to get nexst/previous working..

    Thanks again!

    stevem

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>                                                                                                                                   
    <head>
    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
    <meta name="generator" content="Adobe GoLive">  
    
    
    
    <title>Shooter.net - Home of Photography by Stevem</title>                                                                                         </head>
    
    <body bgcolor="black" text="white" link="white" vlink="white" alink="white">
    
    <table width="95%" border="0" cellspacing="2" cellpadding="0" 
            align="center" bgcolor="black" height="20">
    
    <tr align="center" valign="middle">
    
    <td align="center" valign="middle" bgcolor="#333333" width="17%">
            <font size="-1" color="white" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.shooter.net/index.php">_        Home</a></font></td>
    
    <td align="center" valign="middle" bgcolor="#333333" width="17%">
            <font size="-1" color="white" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.shooter.net/index.php/weblog/cat_list/C5/">_        Photo Tech</a></font></td>
    
    <td align="center" valign="middle" bgcolor="#333333" width="17%">
            <font size="-1" color="white" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.shooter.net/index.php/weblog/cat_list/C2/">_        Galleries</a></font></td>
    
    <td align="center" valign="middle" bgcolor="#333333" width="17%">
            <font size="-1" color="white" face="Verdana, Arial, Helvetica, sans-serif"><a href="mailto:[email protected]">Contact  </a></font></td>
    
    <td align="center" valign="middle" bgcolor="#333333" width="17%">
            <font size="-1" color="white" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.shooter.net/index.php/shopping/">_        Purchase</a></font></td>
    
    <td align="center" valign="middle" bgcolor="#333333" width="17%">
            <font size="-1" color="white" face="Verdana, Arial, Helvetica, sans-serif"><a href="http://www.shooter.net/index.php/weblog/cat_list/C2/">_        Portfolio</a></font></td>
    
    </tr>
    </table>
    
    <table width="95%" border="0" cellspacing="2" cellpadding="0" align="center" bgcolor="black" height="90%">
    
    <tr height="10%">
    
    <td bgcolor="black" width="15%" height="10%"></td>
    
    <td align="center" bgcolor="black" width="70%" height="10%">
            <font size="+2" face="Verdana, Arial, Helvetica, sans-serif">Shooter.net</font></td>
    
    <td bgcolor="black" width="15%" height="10%"></td>
    </tr>
    <tr height="85%">        
    <td bgcolor="black" width="15%" height="85%"></td>                                                                                                        
    <td align="center" bgcolor="black" width="70%" height="85%"><font color="white">                                        
    
    
    {exp:weblog:entries weblog="weblog1" category="80" orderby="date" sort="desc" limit="1" paginate="bottom"}
    
    {date_heading}
    {entry_date format='%M %d, %Y'}
    
    {/date_heading}
    
    <h2 class="title">{title}</h2>
    <h3 class="summary">{summary}</h3>
    
    {exp:allow_eecode}
    
    {body}
    
    
    {/exp:allow_eecode}
    
    {if extended}
    
    <a href="http://{permalink=weblog/Item}">More…</a>
    {/if}
    
    {if related}
    <h2 class="date">Related Entries:</h2>
    {related}
    {/if}
    
    
    <div class="posted">
    
    <center>
    <a href="http://{comment_path=">Feedback</a> ({comment_total})
    
    
    Posted by <a href="http://{profile_path=member/index}">{author}</a> on {entry_date format='%m/%d/%y'} at {entry_date format='%h:%i %A'}
    
    
    
    
    Category: {categories}<a href="http://{path=weblog/Item}">_{category_name}_</a> 
    {/categories}
    
    
    
    <a href="http://{title_permalink=weblog/friend}">Share this entry with a friend</a>
    
    
    Permalink: <a href="http://{title_permalink=weblog/Item}">{permalink=weblog/Item}</a>
    
    </center>
    </div>
    
    
    {paginate}
    <CENTER>Page {current_page} of {total_pages} pages {pagination_links}</CENTER>
    {/paginate}
    
    
    {/exp:weblog:entries}
    
    TTTTTTTHIS
    
    </font></td>                                        
    <td bgcolor="black" width="15%" height="85%"></td>                                                                                               
    </tr> <tr valign="middle" height="5%"><td bgcolor="black" width="15%" height="5%"></td>
    
    
    <td bgcolor="black" width="15%" height="5%"></td></tr>
    
    </table>
    {exp:weblog:next_entry weblog="weblog1"}
    Next entry: <a href="http://{path=weblog/comments}">{title}</a>
    {/exp:weblog:next_entry}
    
    {exp:weblog:prev_entry weblog="weblog1"}
    Previous entry: <a href="http://{path=weblog/comments}">{title}</a>
    {/exp:weblog:prev_entry}
    
    sucks
    
    </body>
    </html>
  • #6 / Jun 28, 2007 3:21pm

    Lisa Wess

    20502 posts

    Well, I just took your code, removed the allow_eecode plugin (hehe) and pasted it into my site.  It’s working.

    I had to remove the category= statement for it to work.  If you remove your category statement, though I know that isn’t ideal, does it work for you?

  • #7 / Jun 28, 2007 3:26pm

    stevem

    5 posts

    Cool. Thanks. I’m amazed at how fast you’re helping! Good customer care!

    The starting plate for this template was another slideshow attempt…  I’ll send you a PM with a template that uses the allow ee code tag that will make your hair curl!

    Anyways, yeah, if I leave off the category=, then it would entries that won’t be appropriate for the photo blog.  I’m trying to not have to use another weblog for this effort…

    So kinda setting aside the prev/next, can you think of any way to achieve the functionality found here:

    http://www.seekingfocus.com/photo/

    I could munge something together outside of EE, but I’d really prefer to keep it within ee…

    Any ideas?

  • #8 / Jun 28, 2007 3:29pm

    Lisa Wess

    20502 posts

    The starting plate for this template was another slideshow attempt… I’ll send you a PM with a template that uses the allow ee code tag that will make your hair curl!

    What is it, Torture Lisa Day? 😉

    Steve - just for now, can you try turning off the category= just to confirm it works? I want to make sure of that to isolate the problem.  Like I said, it’s not ideal, but I just want a 30 second test, you can switch it right back.

  • #9 / Jun 28, 2007 3:37pm

    stevem

    5 posts

    Removed the category=“80”, and now I see all my weblog entries. one per page. However the next/previous still isn’t showing up….

    While working on this last night I tried trimming out all extraneous stuff, and still couldn’t get it to work…

    Thanks for your help… Not trying to torture you!  really!

  • #10 / Jun 28, 2007 3:39pm

    Lisa Wess

    20502 posts

    Oh this isn’t torturing me, that template made me go cross-eyed, though.  Please don’t take offense at that. =)

    Mmm, hrm.  I need to ask you to upgrade to 1.6 at this point, Steve.  As you can see in my test link, the next/prev links do show up - see the test link.  Are you testing this with a url-title in segment 3?

    {exp:weblog:entries weblog="dem"  orderby="date" sort="desc" limit="1" paginate="bottom"}
    
    {date_heading}
    {entry_date format='%M %d, %Y'}
    
    {/date_heading}
    
    <h2 class="title">{title}</h2>
    <h3 class="summary">{summary}</h3>
    
    
    {body}
    
    
    
    {if extended}
    
    <a href="http://{permalink=weblog/Item}">More…</a>
    {/if}
    
    {if related}
    <h2 class="date">Related Entries:</h2>
    {related}
    {/if}
    
    
    
    {paginate}
    <CENTER>Page {current_page} of {total_pages} pages {pagination_links}</CENTER>
    {/paginate}
    
    
    {/exp:weblog:entries}
    
    TTTTTTTHIS
    
    </font></td>                                        
    <td bgcolor="black" width="15%" height="85%"></td>                                                                                               
    </tr> <tr valign="middle" height="5%"><td bgcolor="black" width="15%" height="5%"></td>
    
    
    <td bgcolor="black" width="15%" height="5%"></td></tr>
    
    </table>
    {exp:weblog:next_entry weblog="dem"}
    Next entry: <a href="http://{path=weblog/comments}">{title}</a>
    {/exp:weblog:next_entry}
    
    {exp:weblog:prev_entry weblog="dem"}
    Previous entry: <a href="http://{path=weblog/comments}">{title}</a>
    {/exp:weblog:prev_entry}]
  • #11 / Jun 28, 2007 3:46pm

    stevem

    5 posts

    Cool. Thank you for your help. I’ll upgrade and see how it works. I’ll let you know.

    However, I’m still open to any suggestions for how the achieve the functionality I’m looking for. Basically I want to wrap an entire blog entry in a “previous” tag so it works like this site: http://www.seekingfocus.com/photo/ Do you have any suggestions or any ideas where I can turn to find a way to do this?

    That is my ultimate goal…

    Thanks again!

    stevem

  • #12 / Jun 28, 2007 3:49pm

    Lisa Wess

    20502 posts

    I don’t, and that part I think needs to go into the how-to forum.  But to be blunt, I think it’s in your best interest to get this working in the normal fashion first before exploring new, cool functionality. 

    I can’t split your message in two, so I’ll have to ask that you post it into how-to; but I really would wait til we get this sorted.  I’m suspecting that a custom plugin would be your best bet.  Grab the ID of the current entry, query for the next one, if it exists, and create the link.  Surround the body code with that plugin, and voila.  But I am not a programmer so there may be a better approach.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases