Skip to Content Skip to Menu

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

PHP and queries in the CB List Description using DirectPHP ore ARI smart content does not work / or using what ?

  • Hansueli
  • Hansueli
  • OFFLINE
  • Posts: 48
  • Thanks: 1
  • Karma: 0
11 years 2 months ago - 11 years 2 months ago #231953 by Hansueli
I have Joomla 3.1.5 with CB 1.9 and
“DirectPHP Version 3.0” extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-content/4470
ore: ARI smart content: www.ari-soft.com/vmchk/Joomla-Components/ARI-Smart-Content/Detailed-product-flyer.html

I have several lists and in each of them I have the
Title and the Description
I would like to generate the description with php using a query
Ore queries mixt with text. If possible using the listid as parameter in the queries
(similar to queryfields)

Now I tested the following things:
- I inserted in a article {?php echo "Hallo World" ; ?} and it displays: "Hallo World" (works perfect!)
- I inserted in Description of a Content Category {?php echo "Hallo World" ; ?} an it displays: "Hallo World" (works perfect!)

- But if I insert {?php echo "Hallo World" ; ?} in the description of a CB List then I get: {?php echo "Hallo World" ; ?} :angry:
Can you help me?
Is there an other way in CB?
Thanks

rh
Last edit: 11 years 2 months ago by Hansueli. Reason: addet: does also not work with ARI...

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #231985 by krileon
CB Userlists do not process Joomla Content Plugins so that's not going to work. Why do you need PHP in a Userlist description? What specifically are you trying to add to it?

We also do not support your usage. It's dangerous to be executing PHP like that and you've just created a vulnerability on your site. What happens if someone gets into an account that can create frontend articles? They could easily inject PHP straight into your site to drop all your Joomla tables.


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.

  • Hansueli
  • Hansueli
  • OFFLINE
  • Posts: 48
  • Thanks: 1
  • Karma: 0
11 years 2 months ago - 11 years 2 months ago #232002 by Hansueli
I try to explain:
I have this homepage: www.ifsda.org
Here I have about 1200 user and they are in about 20 countries.
Now I have as example a List of the association in Switzerland:
www.ifsda.org/index.php?option=com_comprofiler&task=usersList&listid=9

on top of the list I like the address and other information’s like:
www.ifsda.org/add/i/acc.php?asscd=CH

All the information’s in the Header relate to users and they are in the database saved as users.
(including the associations itself)
See also the List: Dealers assotiation: www.ifsda.org/index.php/component/comprofiler/userslist/Associations?Itemid=552
(see also the field “Members” as a nice use of a query field)


rh
Attachments:
Last edit: 11 years 2 months ago by Hansueli.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #232011 by krileon
In that case I suggest creating a custom module that pulls and displays your needed information then add it to your CB Userlist. Alternative is to use your PHP script and use it in a custom html module then add that module to your userlist. Another alternative is you could use CB Auto Actions PHP action to execute whatever code you need then tell it to echo your result on the onBeforeDisplayUsersList trigger.


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