Module Same Author

More
13 years 4 weeks ago #32477 by igcorreia
Replied by igcorreia on topic Module Same Author
Great man. Make sure you add this as a feature. Now we can have MY ITEMS in view and in MODULES :D

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

More
13 years 4 weeks ago #32478 by ggppdk
Replied by ggppdk on topic Module Same Author
Just make this patch i will commit it with value "3" as i said in my previous post and LABEL

"Current Logged User (My items)"


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

More
13 years 4 weeks ago #32479 by igcorreia
Replied by igcorreia on topic Module Same Author
you have a small bug there in the second else, should be else if I think.

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

More
13 years 4 weeks ago #32481 by igcorreia
Replied by igcorreia on topic Module Same Author
Please test it, because it not working for me. But I understand your code and should work. Will explore it more.

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

More
13 years 4 weeks ago #32482 by ggppdk
Replied by ggppdk on topic Module Same Author
no, other choice so the final else includes all not "catched" cases , thus the value 3 too ...

i just added a documentation comment :
// $behaviour_auth == 3


i tested it ,
- did you login ?
- did you apply change to helper.php exactly as given?
- and also applied the changes to XML file too and then re-edited and re-saved the module?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

More
13 years 4 weeks ago #32483 by igcorreia
Replied by igcorreia on topic Module Same Author
Yes to all.

Final PHP:
Code:
if ($behaviour_auth == 1) { $where .= ' AND i.created_by = ' . (int)$curitem->created_by; } else if ($behaviour_auth == 2) { $where .= ' AND i.created_by <> ' . (int)$curitem->created_by; } else { // $behaviour_auth == 3 $where .= ' AND i.created_by = ' . (int)$user->id; }

Final XML
Code:
<field name="behaviour_auth" type="list" default="0" label="FLEXI_BEHAVIOUR_STATIC_DYNAMIC" description="FLEXI_BEHAVIOUR_STATIC_DYNAMIC_DESC"> <option value="0">FLEXI_STATIC_DO_NOT_COMPARE_CURRENT_ITEM</option> <option value="1">FLEXI_SAME_AUTHOR</option> <option value="2">FLEXI_NOT_SAME_AUTHOR</option> <option value="3">FLEXI_NOT_LOGGEDIN_USER</option> </field>

Open MODULE AND RESAVED. We update tomorrow. It is ok. I am going to report now what I think is a serius bug. Permission related. That is more important.

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

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save