HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Removing activity links in activity block

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#97537 (In Topic #19316)
Avatar

Well-settled

Remove them instead of onto an additional page

Hello

I am planning on using this activity block at the very top of my forums, so users can see exactly what all other users are doing, and then go directly to them.

Due to where I have this positioned, I only want it to show 5 activities at once, so I have set this in the block, which is good.
This however adds these onto another page, and when built up allows the user to change the default amount per page to spread them all out onto one page.

There is what I think is a small bug, that when trying to delete these links from any page other then the first one it takes you back to the welcome page of the full site.
That is not really that much of a problem as I would like to find away to when it hits 5 to not create another page and either delete them or just not show them in that particular block.

Is there anything I can change in the blocks file?

Any help appreciated as always

Mark
Back to the top
 
Important!
Posted
Rating:
#97552
Avatar

Automated fix message

kenno said

Hello

I am planning on using this activity block at the very top of my forums, so users can see exactly what all other users are doing, and then go directly to them.

Due to where I have this positioned, I only want it to show 5 activities at once, so I have set this in the block, which is good.
This however adds these onto another page, and when built up allows the user to change the default amount per page to spread them all out onto one page.

There is what I think is a small bug, that when trying to delete these links from any page other then the first one it takes you back to the welcome page of the full site.
That is not really that much of a problem as I would like to find away to when it hits 5 to not create another page and either delete them or just not show them in that particular block.

Is there anything I can change in the blocks file?

Any help appreciated as always

Mark
This issue has been filed on the tracker as issue #1257, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Rating:
#97553
Avatar

I didn't quite get what you described, but a re-test did reveal some problems (fixed above). They may be the same cause.

To remove pagination removing {PAGINATION} from the BLOCK_MAIN_ACTIVITIES template.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97576
Avatar

Well-settled

Thanks Chris

I will give this a try, and also have a go at removing that {PAGINATION} from block.

Chris, if I may, can I ask a few things regards this block, when commenting on something for example, if you comment on a created page with the comments block on there it seems to drag the blocks file name into this

"Mark has commented on a block_main_comments, 'Rescues"

Is that something I can changed when adding the block?, I am not sure if the fixes you applied will cure another issue, where clicking these particular comments links, it only takes you to the home page and not to the page where the comments were made on.

Sorry for all the questions, but just one more things regards this, should the block not say the username when someone creates a status update? As at present it seems to just add the contents of the status but not who it was created by.

Thanks Mark

Back to the top
 
Posted
Rating:
#97579
Avatar

Well-settled

I applied the hotfix, and it seems to now not delete any of the activities in the block without sending you back to the home page.

Also it seems to be behaving a little crazy now while showing sometimes all the comments and then sometimes showing just 5
(I have not touched the {PAGINATION} thing just yet :lol: )

Have a look on the image, if you do look at the site in regards to the other post I made you will see what I mean



Thanks Mark
Back to the top
 
Posted
Rating:
#97605
Avatar

Hi,

You were actually running an old version of the addon. So I have reinstalled it, with my fixes, and it is now working okay. But I came across a couple more bugs in ocPortal in the process of installing the update as I was doing it in an unconventional untested way (usually I'd use FTP); sigh, lol.

I'll look at your issue with main_comments activities now.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97606
Avatar

Sorted :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97608
Avatar

Well-settled

Chris

I am sorry I thought I was running the latest version, I know it advised that I was running an out of date add-on, but I thought as I had already applied a hot fix to this previous (recently), that I didn't need to update it in there, anyway thanks for that, it does work a treat.

I am going to try the paging thing and to remove that, also I am going to have a look at the way it adds the status updates, as if that is the only thing in the block that does not drag the $username in with it.

Thanks again

Back to the top
 
Posted
Rating:
#97611
Avatar

It's passed into the templates. If you look at ACTIVITY.tpl, you'll see it contains a bit in the middle about avatars, but is commented out. That's because by default the activities block is just used as a per-member tab.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97613
Avatar

Well-settled

Thanks for the info I will have a look.

What is the default use of this actual block then, is it just solely to be used in that users profile area
Back to the top
 
Posted
Rating:
#97614
Avatar

That is the default out of the box use, but of course not the designed limits of the block.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97616
Avatar

Well-settled

I have looked in that activity.tpl file

You are talking about this area which I have changed

Code

<div class="activities_avatar_box">
   {+START,SET,commented_out}
   {+START,IF_NON_EMPTY,{ADDON_ICON}}
      <img src="{$THUMBNAIL*,{ADDON_ICON},36x36,addon_icon_normalise,,,pad,both,#FFFFFF00}" />
   {+END}
   {+START,IF_EMPTY,{ADDON_ICON}}
      <img src="{$THUMBNAIL*,{$IMG,bigicons/edit_one},36x36,addon_icon_normalise,,,pad,both,#FFFFFF00}" />
   {+END}{+END}


      {+START,IF_EMPTY,{MEMPIC}}{+START,IF_NON_EMPTY,{$IMG,ocf_default_avatars/default_set/ocp_fanatic,0,,1}}
         <img src="{$THUMBNAIL*,{$IMG,ocf_default_avatars/default_set/ocp_fanatic,0,,1},36x36,addon_avatar_normalise,,,pad,both,#FFFFFF00}" />
      {+END}
      {+START,IF_NON_EMPTY,{MEMPIC}}
         <img src="{$THUMBNAIL*,{MEMPIC},36x36,addon_avatar_normalise,,,pad,both,#FFFFFF00}" />
      {+END}
   {+END}
</div>

<div class="activities_line">
      {+START,IF_PASSED,USERNAME}
         <div class="activity_name left">
            <a href="{MEMBER_URL*}">{USERNAME*}</a>
         </div>
      {+END}

I think I have grasped what it does, what I can`t seem to understand is why does it not bring the users avatar into the block and only grab that little ocp default image, even when I have an avatar, as you can gather I am not a programmer, I just am what you could call a copy and paste type of person.
Would you say I need to add something in here to reflect the users avatar being used?
Back to the top
 
Posted
Rating:
#97619
Avatar

Well-settled

Wow I just figured it out I think

Needed to remove the end part of this line as well

{+START,IF_EMPTY,{MEMPIC}}{+START,IF_NON_EMPTY,{$IMG,ocf_def
ault_avatars/default_set/ocp_fanatic,0,,1}}


I seem to be getting some strange things happen in the profile area when going visiting the profile of my admin account which is linked to Facebook though
Every time I click go to my profile page, it immediately loads the activity tab, but this does not show the same behavior as masquerading as another user

Strange


Last edit: by kenno
Back to the top
 
Posted
Rating:
#97620
Avatar

I had a little play, I prefer this…

Code

{+START,IF,{ALLOW_REMOVE}}
   <form id="feed_remove_{LIID*}" class="activities_remove" action="{$PAGE_LINK*,:start}" method="post" onsubmit="return s_update_remove(event,{LIID*});">
      <input class="remove_cross" type="submit" value="{!REMOVE}" />
   </form>
{+END}

<div class="activities_avatar_box">
   {+START,IF_NON_EMPTY,{ADDON_ICON}}
      <img src="{$THUMBNAIL*,{ADDON_ICON},36x36,addon_icon_normalise,,,pad,both,#FFFFFF00}" />
   {+END}
   {+START,IF_EMPTY,{ADDON_ICON}}
      <img src="{$THUMBNAIL*,{$IMG,bigicons/edit_one},36x36,addon_icon_normalise,,,pad,both,#FFFFFF00}" />
   {+END}

   {+START,SET,commented_out}
      {+START,IF_EMPTY,{MEMPIC}}{+START,IF_NON_EMPTY,{$IMG,ocf_default_avatars/default_set/ocp_fanatic,0,,1}}
         <img src="{$THUMBNAIL*,{$IMG,ocf_default_avatars/default_set/ocp_fanatic,0,,1},36x36,addon_avatar_normalise,,,pad,both,#FFFFFF00}" />
      {+END}{+END}
      {+START,IF_NON_EMPTY,{MEMPIC}}
         <img src="{$THUMBNAIL*,{MEMPIC},36x36,addon_avatar_normalise,,,pad,both,#FFFFFF00}" />
      {+END}
   {+END}
</div>

<div class="activities_line">
   {+START,SET,commented_out}
      {+START,IF_PASSED,USERNAME}
         <div class="activity_name left">
            <a href="{MEMBER_URL*}">{USERNAME*}</a>
         </div>
      {+END}
   {+END}

   <div class="activity_time right">
      {$MAKE_RELATIVE_DATE*,{DATETIME},1} {!AGO}
   </div>

   <div class="activities_content">
      {$,The main message}
      {+START,IF,{$EQ,{LANG_STRING},RAW_DUMP}}
         {+START,IF,{$EQ,{MODE},all}}
            <a href="{MEMBER_URL*}">{USERNAME*}</a> says {BITS}
         {+END}
         {+START,IF,{$NEQ,{MODE},all}}
            {BITS}
         {+END}
      {+END}
      {+START,IF,{$NEQ,{LANG_STRING},RAW_DUMP}}
         {+START,IF,{$EQ,{MODE},all}}
            {!ACTIVITY_HAS,<a href="{MEMBER_URL*}">{USERNAME*}</a>,{$LCASE,{$SUBSTR,{BITS},0,1}}{$SUBSTR,{BITS},1}}
         {+END}
         {+START,IF,{$NEQ,{MODE},all}}
            {BITS}
         {+END}
      {+END}
   </div>
</div>


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97622
Avatar

Well-settled

I just added yours, but forgive my ignorance, but what is different to that one then the original.

I can see you made coding changes to the lower part, but I can`t make out exactly what that has done.

I guess I can still edit this to show the avatar and the username, which is the way I think I want it instead of the icons

Mark
Back to the top
 
Posted
Rating:
#97623
Avatar

If mode is all, it starts the line with some reference to the user, within the sentence.

If mode is not all (= mode is member, i.e. for a specific member) it just says it verbatim.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97624
Avatar

Oh and it has separate code for whether it is a RAW_DUMP (= manually typed status message) or not. RAW_DUMP is "says", while others are "has".


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#97629
Avatar

Well-settled

Are I see, so it does!

On a quick refresh I didn't spot that at first, but now looking at it with your explanation I can see what the code does and how it is reflected in the block.

That is loads better, just what the doctored ordered thanks for that
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: