Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Block profile by user choice

  • GUEST
13 years 11 months ago - 13 years 10 months ago #151935 by
Hi all

there is a way to use uddeim block to block userview? into uddeim faq we find a little hack but actually seems it don't work with CB 1.3.1

there is a way to permit a user to block another while he block their message? these would be a very topic feature for our site

Bioboy
Last edit: 13 years 10 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
13 years 11 months ago #151955 by krileon
Replied by krileon on topic Re: Block profile by user choice
Sounds like something you'd need to propose to UddeIMs developer to implement. Am not aware of such a feature. You can find UddeIM specific boards at the following URL.

www.joomlapolis.com/forum/25-uddeim-plugin-and-component


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • GUEST
13 years 11 months ago #151963 by
Replied by on topic Re: Block profile by user choice
Krileon

thank you for your prompt reply!

yes I post on that forum but no answer from developer

ok I found some hack but this seems not working on CB 1.3.1

the hack is:
Code:
// BLOCKING-HACK if ( defined( 'JPATH_ADMINISTRATOR' ) ) { $user =&JFactory::getUser(); $myid = $user->id; $db =&JFactory::getDBO(); } else { global $my, $database; $myid = $my->id; $db = $database; } if ($myid) { $db->setQuery("SELECT COUNT(id) FROM `#__uddeim_blocks` WHERE blocker=".(int)$user->id." AND blocked=".(int)$my->id); $is_blocked = (int)$db->loadResult(); if ($is_blocked) { echo '<fieldset><legend>Ignore</legend> <label for="description">The user has blocked his profile, so you cannot access it</label><br /><br /></fieldset>'; $showProfile = 0; } }

to insert before line:
Code:
if ( $showProfile == 1 ) {

into the file: /components/com_comprofiler/comprofiler.html.php

maybe somethings in the above code is wrong because the profile page give a blank screen
simply can you take a look at the code in order to advise if you look somethings wrong

I hope someone can help us with this issue

many thanks in advance

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
13 years 11 months ago #151996 by krileon
Replied by krileon on topic Re: Block profile by user choice
Best approach is to develop a new CB plugin which utilizes CB triggers (there is a trigger that fires before profile display) that redirects users away from the profile. More on trigger usage (and working example) can be found at the following URL.

www.allmysocials.com/tutorials/item/228-event-triggers


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • GUEST
13 years 10 months ago #152626 by
Replied by on topic Re: Block profile by user choice
ok we are moved forward

we installed cbqueries plugin from incubator, there is a way to implement that function with this plugin?
into cb_triggers "field" we manually insert onBeforeUserProfileDisplay (because it is not listed in dropdown menu) now we are looking to know what is the best way to make a sql query to prevent user display on the base of uddeim block i trust this would be a fantastic function for all joomlapolitans because there is no block function in CB itself We hope you can give use the right way to solve it

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
13 years 10 months ago #152728 by krileon
Replied by krileon on topic Re: Block profile by user choice

now we are looking to know what is the best way to make a sql query to prevent user display on the base of uddeim block i trust this would be a fantastic function for all joomlapolitans because there is no block function in CB itself We hope you can give use the right way to solve it

This isn't something CB Queries can do. CB Queries executes a database query at specific CB triggers. This won't assist in preventing a user that has been blocked by another user from viewing their profile. I'd say CB Redirect, but that won't help either as it is not conditional. I still stand by my initial suggest that you'll need to develop a new plugin to accomplish what you're wanting; is simply too specific for incubator projects.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum