Bug 4973 - Add "view my entries in this community" to post-entry-creatio... #332

Merged
merged 2 commits into from Apr 16, 2013

2 participants

@ninetyd

...n page for communities

http://bugs.dwscoalition.org/show_bug.cgi?id=4973
-- Add link to ?poster= on community update success page (Beta only)

@ninetyd

1) Is there a smarter way of doing this?
2) Beta only because of 1) and wasn't sure whether I was supposed to edit /update too.

@afuna afuna and 2 others commented on an outdated diff Apr 2, 2013
cgi-bin/DW/Controller/Entry.pm
@@ -991,6 +994,7 @@ sub _do_post {
ml_string => "/update.bml.success.links.memories" },
{ url => "$LJ::SITEROOT/edittags?journal=$juser&itemid=$ditemid",
ml_string => "/update.bml.success.links.tags" },
+ $community_entries,
);
@afuna
Dreamwidth Studios member
afuna added a line comment Apr 2, 2013

What I'd suggest is, on a separate line:

push @links, { ... } if $ju->is_community

Then you wouldn't need to edit the FOREACH loop in /entry/success.tt.

@ninetyd
ninetyd added a line comment Apr 2, 2013

This is what I tried at first but it wouldn't compile. It doesn't like the if after the }

@alierak
Dreamwidth Studios member
alierak added a line comment Apr 2, 2013

It does too, so long as you do it in a separate push and don't accidentally put the if inside the ); at the end of the first push.

Another approach is to push () instead of "" when you are trying to push nothing.

@ninetyd
ninetyd added a line comment Apr 2, 2013

facepalm Thank you Alierak ! I swear I know how to read. XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@afuna afuna commented on the diff Apr 2, 2013
htdocs/update.bml.text
@@ -115,6 +115,8 @@
.success.links.memories=Add the entry to your memories
+.success.links.myentries=View all my entries in this community
@afuna
Dreamwidth Studios member
afuna added a line comment Apr 2, 2013

Hmm, should this be "view all my entries", or "view all of my entries"?

@kareila
Dreamwidth Studios member
kareila added a line comment Apr 2, 2013

I think omitting the "of" sounds better in this case. See also "all the king's horses and all the king's men."

@afuna
Dreamwidth Studios member
afuna added a line comment Apr 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ninetyd ninetyd Bug 4973 - Add "view my entries in this community" to post-entry-crea…
…tion page for communities


http://bugs.dwscoalition.org/show_bug.cgi?id=4973
-- Add link to ?poster= on community update success page (Beta only)
2a31c84
@afuna afuna commented on the diff Apr 15, 2013
cgi-bin/DW/Controller/Entry.pm
@@ -993,6 +993,9 @@ sub _do_post {
ml_string => "/update.bml.success.links.tags" },
);
+ push @links, { url => $ju->journal_base . "?poster=" . $auth->{poster}->user,
@afuna
Dreamwidth Studios member
afuna added a line comment Apr 15, 2013

noting for style: parantheses around the if statement is not needed. otherwise this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ninetyd ninetyd Bug 4973 - Add "view my entries in this community" to post-entry-crea…
…tion page for communities


http://bugs.dwscoalition.org/show_bug.cgi?id=4973
-- Add link to ?poster= on community update success page (Beta only)
539f657
@ninetyd

Updated as requested. Thanks for the advice! Here's a cat just because CAT!!!

Sans titre - 1

@afuna
Dreamwidth Studios member

Happy cat! Much appreciated, thank you!

@afuna afuna merged commit 1f10ef3 into dreamwidth:develop Apr 16, 2013
@ninetyd ninetyd deleted the ninetyd:bug4973/post_success_link branch Apr 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment