Skip to Content Skip to Menu

[HACK!] Ignore whole profile

15 years 10 months ago #83299 by schmatzler
[HACK!] Ignore whole profile was created by schmatzler
The Ignore-Function of UddeIM is great, but doesn't really make sense, when Profilebook is enabled, because a blocked User can

1. still see the profile
2. flame the other one trough his guestbook

So i made a little hack to comprofiler.html.php:

ABOVE the line:

[code:1]if ( $showProfile == 1 ) {[/code:1]

this has to be added:

[code:1]##################################
######### BLACKLIST-HACK #########
##################################
global $my, $database;

if ($my->id) {
$database->setQuery("SELECT * FROM `#__uddeim_blocks` WHERE blocked = " . $my->id );
$rows = $database->loadObjectList();
if ($rows[0]->blocker == $user->id) {
echo '
<fieldset>
<legend>Ignore function</legend>
<label for="description">This user has restricted access to his profile. Go away and think about it ;«»)</label><br /><br />
<br />
</fieldset>
</form>';
$showProfile = 0;
}
}
##################################
######### BLACKLIST-HACK #########
################################## [/code:1]

A user, who has been blocked trough UddeIM does no longer have access to the profile now. Very peaceful. B)

Please Log in or Create an account to join the conversation.

15 years 10 months ago #83313 by Deinticker
Replied by Deinticker on topic Re:[HACK!] Ignore whole profile
Respect...doesn´t thinked of that :pinch: Great work...Does this work with RC4 ?

Please Log in or Create an account to join the conversation.

15 years 10 months ago #83314 by schmatzler
Replied by schmatzler on topic Re:[HACK!] Ignore whole profile
Yes it does ;)

Now I just need a Ignore-Button on the profile, because if someone writes into the guestbook but sends no PMs, its not possible to ignore him trough UddeIM ;)

Lets see if I can manage this B)

Please Log in or Create an account to join the conversation.

15 years 10 months ago #83317 by schmatzler
Replied by schmatzler on topic Re:[HACK!] Ignore whole profile
GOT IT! :laugh:

On joomlapolis.de some guys had created another ignore system, which was using an extra table. It was useless for me in its original state, because one single user had to be blocked in UddeIM and on the profile, if I would have use that.

I've modified it, so that it is now using UddeIMs block-table in database.

Simply install it as a Community Builder plugin, each user now has a Ignore-Tab on its profile, where it is possible to ignore him or to unblock him, if he had been ignored. The good thing is, the original plugin had no manager like UddeIM with all blocked users listed, thats now implemented :woohoo:

Attachment plug_blacklist.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

15 years 10 months ago #83322 by videoandfun
Replied by videoandfun on topic Re:[HACK!] Ignore whole profile
more info to my original can you find here:
www.joomlaportal.de/komponenten-1-0-x/148618-cb-e-buddylist-erweiterung-user-blocken-ignorieren.html

thanks for the hack, so i can manage this with uddeim.

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
15 years 10 months ago #83367 by slabbi
Replied by slabbi on topic Re:[HACK!] Ignore whole profile
You can download a CB plugin from the trunk which does the same and does NOT contain several security related issues (e.g. remove blockings from other users).

When the whole profile should be blocked the hack is still required but I would suggest to change it to:

[code:1]$database->setQuery("SELECT count(id) FROM #__uddeim_blocks WHERE blocked=".$my->id." AND blocker=".$user->id );

$is_blocked = (int)$database->loadResult();

if ($is_blocked) {[/code:1]

So the text should only appear when a user visits a profile that is blocked for him (I have not tested the code snippet above but is should do the job).

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum