Profile View Count Download 6.1 dev1

This component/theme works with latest OSSN version.
5.0
German Michael Zülsdorff 2 months ago

Profile View Count 'Allon Prooit'

as requested on https://www.opensource-socialnetwork.org/discussion/view/6500/profile-view-count-component

Since Allon is known to run a significantly edited Ossn, Profile View Count 6.1 dev1 is implementing only the database part, and I'm sure he'll add a line like <div class="profile_view_count"><?php if (isset ($user->profile_view_count)) {echo ossn_print('com:profile:view:count:viewed', array($user->profile_view_count));} ?></div> somewhere on his profile page manually.

Comments
us Allon Prooit Replied 3 weeks ago

Come on ~Z~ Man! Give up the goods. Where should this tremendous snippet go? Where's the best file to put it into?

us Allon Prooit Replied 2 months ago

What file are you showing there?

German Michael Zülsdorff Replied 2 months ago

How shall we know where exactly Line#71 is located in a modified environment like yours?
Maybe you placed the code inside of an if condition or whatever...
Thus, in order to assure the invisibility of your added line is not caused by any side effects and you're editing the right file at all I would put a simple text right in the beginning of the file in question, first.
If the simple text appears as expected, add by my code before the line

<div class="ossn-profile container">

, and verify the visibility again.


enter image description here

us Allon Prooit Replied 2 months ago

Awe Michael, you made a component just for me? How sweet. Love you bunches. But, then you posted it to a public community site and not expect others to work with it? Seems counter intuitive, don't you think? I should hope the community as a whole tries it out and that at least someone can make it work besides me. As for changing core files... how is slightly altering a components HTML output that? I can understand that when the next OSSN update rolls around that the changes will be lost, but that's the game isn't it? I keep my changes in my head but highly suggest putting them in a notepad file for further use!

German Michael Zülsdorff Replied 2 months ago

".... Has anyone else been able to make it work?...."

Allon,
I intentionally added 'Allon Prooit' to the component's name because it wasn't meant for anyone else indeed.
Changing Ossn's core files was highly discouraged from the very beginning, as I can only repeat here. Hence motivating the community now to do just that is really counter productive.

us Allon Prooit Replied 2 months ago

Ok so, components/OssnProfile/plugins/default/profile/pages/profile.php seems to be the best place to put the code Michael has mentioned. I haven't been able to get it to show just yet. I put it on line 71. That seems to be the best place. It's not showing up, like I said. Has anyone else been able to make it work?
Also, thanks Michael for the edit.

German Michael Zülsdorff Replied 2 months ago

Core removed --- must have got that wrong, sorry ;)
enter image description here

us Allon Prooit Replied 2 months ago

Meh, Michael, no. I haven't made bad changes or any changes really to the core files. I keep them shiny and safe. Thanks for all the help!

us Allon Prooit Replied 2 months ago

Ok, so what is the exact source code file for the profile page is what they all need.

us Allon Prooit Replied 2 months ago

Many thanks for all your hard work Michael! I will definitely be trying this out in the near future!!!

Component

Developer: Michael
License GPL v2
Type: Uncategorized
Requires Ossn Version : 6.0
Latest Version: 6.1 dev1
Last Updated 2 months ago
Repository Url View Repository

Versions