Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

cbUserListChanger - are ranges possible?

  • krebsinfo
  • krebsinfo
  • OFFLINE
  • Posts: 13
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #221029 by krebsinfo
cbUserListChanger - are ranges possible? was created by krebsinfo
i have 30 ranges with 15 subranges to display. so i create 450 Lists. In every list the cbUserListChanger shows the 450 lists to change. i would like to show the lists to change only for the specific range.

every range (Therapeut, Doctors, hospitals,...) shows users in different locations (vienna, loweraustria, upperaustria,...) so when i select the range "doctors" i would like to see in the dropdownlist only the different locations.

is there an technic to build groups? ...or can i work with different templates with predefined filters?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago #221054 by krileon
Replied by krileon on topic cbUserListChanger - are ranges possible?
You'd need to edit the default template PHP file and add PHP if statements to show/hide the list based off the listid. It's a simple foreach statement so you can remove other listids from it as well as needed. See the class CBListView_html_default and function _renderHead within the below file.

components/com_comprofiler/plugin/templates/default/default.php


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.

  • krebsinfo
  • krebsinfo
  • OFFLINE
  • Posts: 13
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #221101 by krebsinfo
Replied by krebsinfo on topic cbUserListChanger - are ranges possible?
thank you... my php is as well as my english ;-) - when i want to narrow the list to an part of the list name, how can i do this?
the list name = "psychotherapie Wien" then i only want to see all with "psychotherapie" - so i have to narrow in cbUserListChanger...

but i dont understand enough php to do this. please help me to set the right coding.
Code:
function _renderHead( ) { global $_CB_framework; ?> <div class="cbUserListHeadTitle"> <?php if ( ( count( $this->lists ) > 0 ) || $this->searchTabContent ) { ?> <div class="cbUserListChanger"> <?php // selector for user-list: if ( count( $this->lists ) > 0 ) { foreach ( $this->lists as $kname => $ncontent ) { ?> <div class="cbUserListChangeItem cbUserList<?php echo $kname; ?>"><?php echo $ncontent; ?></div> <?php } } if ( $this->searchTabContent ) { if ( ! $this->searchResultDisplaying ) { ?> <div class="cbUserListSearchButtons" id="cbUserListsSearchTrigger"><a class="pagenav" href="#"><?php echo _UE_SEARCH_USERS; ?></a></div> <?php } else { echo '<div id="cbUserListListAll"><a class="pagenav" href="' . cbSef($this->ue_base_url) . '">' . _UE_LIST_ALL . '</a></div>'; } } ?> </div> <?php } // List title: ?> <!--- <div class="contentheading cbUserListTitle"><?php echo $this->listTitleHtml; ?></div> ---> <?php if ( TRUE && trim( $this->listDescription ) ) { // to remove description from front-end display as was before CB 1.2: change TRUE to FALSE. // List description: ?> <div class="contentdescription cbUserListDescription"><?php echo $this->listDescription; ?></div> <?php } // users-count: ?> <div class="contentdescription cbUserListResultCount"><?php if ( $this->totalIsAllUsers ) { echo $_CB_framework->getCfg( 'sitename' ) . " " . _UE_HAS . " <strong>" . $this->total . "</strong> " . _UE_USERS; } else { echo "<strong>" . $this->total . "</strong> " . _UE_USERPENDAPPRACTION . ":"; } ?></div> <div class="cbClr"></div> <?php if ( $this->searchTabContent ) { ?> <div class="contentdescription cbUserListSearch" id="cbUserListsSearcher"> <div class="componentheading"><?php echo $this->searchCriteriaTitleHtml; ?></div> <div class="cbUserListSearchFields"> <?php echo $this->searchTabContent; ?> <div class="cbClr"></div> <div class="cb_form_buttons_line"> <input type="submit" class="button" id="cbsearchlist" value="<?php echo _UE_FIND_USERS; ?>" /> </div> <div class="cbClr"></div> </div> <?php if ( $this->searchResultsTitleHtml ) { ?> <div class="componentheading"><?php echo $this->searchResultsTitleHtml; ?></div> <?php } ?> </div> <?php } ?> </div> <?php }

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

  • krebsinfo
  • krebsinfo
  • OFFLINE
  • Posts: 13
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #221102 by krebsinfo
Replied by krebsinfo on topic cbUserListChanger - are ranges possible?
i found a way to donate for this on your private site ;-))

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
11 years 8 months ago - 11 years 8 months ago #221185 by krileon
Replied by krileon on topic cbUserListChanger - are ranges possible?

but i dont understand enough php to do this. please help me to set the right coding.

I suggest contacting a contract developer to implement for you as we do not provide custom coding; please see signature regarding this.

The variable $ncontent contains the HTML for the list dropdown. You can supply your own HTML or use REGEX to parse and edit the existing HTML. This will allow you to remove lists or add lists as needed.

You can see how CB builds this list at the below location (I do not recommend editing it here, but providing your own code for it in your template instead).

IN: administrator/components/com_comprofiler/library/cb/cb.lists.php
ON: Lines 91-103

i found a way to donate for this on your private site

I believe you misunderstood the donation button on my site. It is not for me to do anything for you; I don't imply it does anywhere so don't see the confusion. It's just a donation. I do not do contract work or paid work as am a full time CB member. Have issued a refund for your donation.


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.
Last edit: 11 years 8 months ago by krileon.

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

  • krebsinfo
  • krebsinfo
  • OFFLINE
  • Posts: 13
  • Thanks: 1
  • Karma: 0
11 years 8 months ago #221197 by krebsinfo
Replied by krebsinfo on topic cbUserListChanger - are ranges possible?
my thougt was to donate the team for all help til yet... the tips they and you gave wherer very helpful. i did try with $ncontent but i did not finde where the tabele ist costructed - my son (18 jears) wil help me more. i did not want to compromise or insult you...

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

Moderators: beatnantkrileon
Powered by Kunena Forum