Checking a specific weblog to see if currently logged in user has posted to it.
Posted: 30 June 2009 12:46 PM   [ Ignore ]
Newbie
Rank
Total Posts:  22
Joined  2008-08-20

I need to check a specific weblog to see if the currently logged in user has posted to it.

In plain english something like…

If currently logged-in user has posted to weblog A

do this

if else

do 
this

End 
if statement 

How would I go about doing this?

Profile
 
 
Posted: 30 June 2009 10:34 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8238
Joined  2006-10-18

Scruffy,

By “posted to it”, do you mean, they authored their entry? smile

{exp:weblog:entries}
...
{if author_id == "{logged_in_member_id}"}
You are the Author
{if
:else}
You
're NOT the Author
{/if}
...
{/exp:weblog:entries} 

Or do you mean commented to it?

 Signature 
Profile
 
 
Posted: 01 July 2009 11:18 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  22
Joined  2008-08-20

I’m looking to check if the currently logged in user has posted an entry to a specific weblog - not a comment. If they haven’t, I want to show them something different than if they have submitted at least one entry to the weblog.

I hope I’m making sense here… might need more coffee.

Profile
 
 
Posted: 02 July 2009 04:02 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8238
Joined  2006-10-18

Piece of pie! grin

{exp:weblog:entries author_id="CURRENT_USER" limit="1"}

You have posted to this Weblog
.

{if no_results}
You have NOT yet posted to this Weblog
.
{/if}

{
/exp:weblog:entries} 
 Signature 
Profile
 
 
Posted: 03 July 2009 11:56 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  22
Joined  2008-08-20

So simple. How come I didn’t think of that? Argh!

Thanks a bunch!

Profile