Recently commented
Posted: 12 April 2008 02:19 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  75
Joined  01-20-2008

Hi all

My “recently commented” code is returning a link that’s not working:

{exp:comment:entries sort="desc" orderby="date" limit="6" dynamic="off"}

<a href="{comment_url_title_auto_path}">{comment}From the entry "{title}".</a>

{/exp:comment:entries}

Is giving me a link of:

http://localhost:8888/index.phpblog_post_as_article/

Which is clearly missing something between php and blog?!

Any ideas?

Profile
 
 
Posted: 12 April 2008 02:57 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

I’m guessing you’re using MAMP on OSX then?

You probably don’t have the comment url title path set correctly in :

Admin->Weblog Administration->Weblog Management->Edit Preferences (Your Weblog Name)->Path Settings->Comment Page URL

Make sure you have a trailing slash in there so it will look something like this :

http://localhost:8888/index.php/blog/comments/


Hope that helps a bit?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 01:58 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-20-2008

Morning Mark,

What I’ve got now is a link to the article; however, it’s given me a similar problem to the one you solved for me the other day smile

Here’s what I’ve got:

<h3>Recently Commented</h3>

{exp:comment:entries sort="desc" orderby="date" limit="6" dynamic="off"}


<a class="footerLinks" href="{title_permalink="stormoftheeye/workArticle"}">{comment}From the entry "{title}"</a>

{/exp:comment:entries}

This works fine if the post is in the “workArticle” template, which lists posts in the “work” weblog. However, I have another template, “article”, which lists entries from the “blog” weblog.

Does that make sense? I guess the answer is similar to the one you gave me here:

http://expressionengine.com/forums/viewthread/76589/

But I played around with that code to no avail…

Profile
 
 
Posted: 13 April 2008 04:08 AM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

Hmm,

It could just be the dull dark weather we are having (sorry - always have :-(  ) over here in the UK but I’m not quite following this one. Where are you using this comment code as it really should be on a single-entry page?

If it is then you would have a single-entry page that is just for that certain weblog which would normally provide you with all that you need. How exactly are you using the comments code and in what context? Also you don’t have it nested within a weblog tag do you as that’s a bad thing.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 04:30 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-20-2008

It’s reasonably sunny down here in Essex!

In my footer I have 3 columns: Categories, Archive and Recently Commented. I’d like the links in the Recently Commented to take the user to the article which has been commented on.

The problem is that that article could be in one of two Weblogs; at the moment, the code above works if the articles are in the “work” Weblog (displayed in the “workArticle” template) but I dont know how to tweak it so the links also reference articles in the “blog” weblog (displayed in the “article” template).

Does that make it any clearer?!?

Profile
 
 
Posted: 13 April 2008 04:45 AM   [ Ignore ]   [ # 5 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

Aha,

Very clear wink

Lucky you with the sun although I think that perhaps we do get the sun here in Birmingham but that the layer of filthy smog above the city is just covering the sky and not letting it through!! wink

Right then I’m still unsure of how you are getting what you are getting. You say you have the {exp:comment} tag down in your footer of your site? Is this on a single-entry page though?

If not then the comment tag doesn’t work unless on a single-entry page I’m afraid :-(

Perhaps let me know if this is the case first before we carry on and we will see what we can come up with.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 05:06 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-20-2008

I’m using the {exp:comment:entries} tag like so:

{exp:comment:entries sort="desc" orderby="date" limit="6" dynamic="off" weblog="blog | work"}


<a class="footerLinks" href="{title_permalink="stormoftheeye/workArticle"}">{comment}</a>

<!--<
p>From "{title}"</p>-->

{/exp:comment:entries}


Perhaps it’s best if I give an example of what I’m trying to achieve (Although this site is made with WordPress):

http://www.ndesign-studio.com/

There’s a “recent comments” list in the footer here; the items in the list link to the relevant article.

The code I’ve pasted above works fine if the articles are in the “work” Weblog (displayed in the “workArticle” template). If that was all I needed, I’d be happy as Larry! But my list of commented articles also features some from another Weblog. The line of code

<a class="footerLinks" href="{title_permalink="stormoftheeye/workArticle"}">{comment}From the entry "{title}"</a>

is, as you can see, creating an <a> with a permalink to the “workArticle” template.

Ideally I want a piece of code which goes like this (bear with my idiotic logic!)

IF the article in the list is in the weblog “work” THEN <a class=“footerLinks” href=”{title_permalink=“stormoftheeye/workArticle”}”> BUT IF the article in the list is in the weblog “blog” THEN <a class=“footerLinks” href=”{title_permalink=“stormoftheeye/article”}”>

Profile
 
 
Posted: 13 April 2008 05:31 AM   [ Ignore ]   [ # 7 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

Ah I do see what you want but I’m pretty sure that this isn’t going to be possible with the {exp:comment} tag as it is either meant to be used on a single-entry page where it then doesn’t matter about the weblog as you would in effect only be looking at the one weblog or whereby you use it in conjunction with the dynamic=“off” parameter but when you do this I think it is expecting your comments to all link to a standard template which is a bit of a pest in this instance.

I’m pretty sure that you can do what you want however!! wink

If you try this code :

{exp:comment:entries sort="desc" orderby="date" limit="6" dynamic="off" weblog="blog|work"}
{if weblog_id
== "2"}
<p><a class="footerLinks" href="{title_permalink="stormoftheeye/workArticle"}">{title}</a></p>
{/if}

{if weblog_id
== "7"}
<p><a class="footerLinks" href="{title_permalink="stormoftheeye/article"}">{title}</a></p>
{/if}

{
/exp:comment:entries}


P.S. Not sure if it matters with your blog | work having spaces between them but just noticed this.

The {weblog_id} variable is the only good piece of information with that tag that we have available to us so where I have weblog_id == “2” and weblog_id == “7” in the code above you will need to change these to reflect the id numbers of your respective weblogs but that should do it for you wink ?

Hope that gets you what you want?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 05:39 AM   [ Ignore ]   [ # 8 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-20-2008

Mark - you are a superhero. You should wear your pants outside your trousers!

Cheeky I know, but do you fancy a look at another problem I have?

http://expressionengine.com/forums/viewthread/76637/

PS Enjoy your Sunday!

Profile
 
 
Posted: 13 April 2008 05:43 AM   [ Ignore ]   [ # 9 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006
spiritbased - 13 April 2008 05:39 AM

Mark - you are a superhero. You should wear your pants outside your trousers!

Well perhaps not eh? wink The wife might think I’m a little crazy!

Well actually she does anyway so I suppose I could possibly get away with it!

spiritbased - 13 April 2008 05:39 AM

Cheeky I know, but do you fancy a look at another problem I have?

http://expressionengine.com/forums/viewthread/76637/

I will take a look now, no promises though wink

spiritbased - 13 April 2008 05:39 AM

PS Enjoy your Sunday!

You mean it’s the weekend? Why wasn’t I told?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 05:45 AM   [ Ignore ]   [ # 10 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

Glad this one is sorted now though.

Housekeeping on this one perhaps and I might even pop this in the WIKI as I don’t seem to remember seeing this anywhere?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 05:49 AM   [ Ignore ]   [ # 11 ]  
Grad Student
Rank
Total Posts:  75
Joined  01-20-2008

*noob question alert*

What kind of housekeeping ought I perform? I want to be a good forum member.

Profile
 
 
Posted: 13 April 2008 05:53 AM   [ Ignore ]   [ # 12 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

Sorry the housekeeping part was aimed towards the moderators. When a post is finished with or the solution has been found then they generally lock the thread out. Please ignore what I was going on about! wink

Just to let you know and anyone else who is interested that I have placed this in the WIKI - Recent Comments

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 April 2008 10:28 AM   [ Ignore ]   [ # 13 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6563
Joined  04-15-2006

Hiya,

Perhaps take a look at this too. It will probably help out no end wink

My only reasoning for doing it in the way I did is outlined in that post but if you do have your {comment_url_title_auto_path} set up correctly then you can use that. My only problem with that is you only have one {comment_url_title_auto_path} and whilst great for some people sometimes you may need more than one “entry point” (as I like to call them) for your end data.

May help in your case though?

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64982 Total Logged-in Users: 26
Total Topics: 82022 Total Anonymous Users: 23
Total Replies: 440848 Total Guests: 189
Total Posts: 522870    
Members ( View Memberlist )
Newest Members:  ariepChris Bandytony leodennisbaldwinhazlett_davidkpspokeli9htcluizmbentsitj