[Solved] warn if restricted item in search results

More
12 years 11 months ago - 12 years 5 months ago #35220 by walkyripa
Hi!

I'm trying to redirect user to a login form (as pop up) when a user click on the title of an item which is only for registered users...

I know how to catch if user is registered or public, and i know how to pop-up a login form. I already use this in the flexicontent category and it works well.

Unfortunately, in the search results, i can't catch the item access. $result->access doesn't exists... ($item->exists in category).

Can you help me on how to achieve that?

Thank you very much!

Merci à la communauté!
Last edit: 12 years 5 months ago by walkyripa.

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

More
12 years 11 months ago #35225 by ggppdk
I see why this can be important,
i ll add this

Instead of doing this manually, we should have a built-in parameter for turning ON the display of such a warning in all listing views.


About redirections i guess you already use this in FLEXIcontent component redirection parameters:

[attachment=0:2m4fvay4]<!-- ia0 -->fc_redirections.png<!-- ia0 -->[/attachment:2m4fvay4]


-- 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
12 years 11 months ago #35387 by walkyripa
Thanks for your answer!

Yes, i already use this parameters.

Did you think of a "manual" workaround for the moment?

Thanks anyway!

Merci à la communauté!

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

More
12 years 11 months ago #35409 by ggppdk
I am adding exactly this for upcoming version,

1. the items in all views will have an access property that will be :
the logical end of

item access
main category access
content type access

Also besides the property items with no access will have an extra CSS class.

About search view i think the modified search plugins can be used by your version and i will give them to you to test


-- 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
12 years 11 months ago #35416 by walkyripa
great! thank you!

Merci à la communauté!

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

More
12 years 8 months ago #37591 by walkyripa
Hi!

ggppdk wrote: I am adding exactly this for upcoming version,
1. the items in all views will have an access property that will be :
the logical end of

item access / main category access / content type access

Also besides the property items with no access will have an extra CSS class.

About search view i think the modified search plugins can be used by your version and i will give them to you to test


Before i look to change code, did you achieve that point? If yes, how can we use it?

Thank you!

Merci à la communauté!

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

More
12 years 8 months ago #37599 by ggppdk
Hello,

We have the code written inside (single) item model
- it needs to be added to the frontend views DB models
- the category template layout files / and the search view default.php template file then will have to be updated

i think we can have this in v2.0.3

These changes will be visible to developers:
1. in ALL item listings category / tags / search / etc an extra CSS class will be added : fc_no_item_access
2. For developers shaping also the HTML layout this will be available:
$items[$i]->has_access

(which will be calcalated as :)
has_access = access && has_mcat_access && has_type_access

Regards


-- 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
12 years 8 months ago #37600 by walkyripa
Hum... not sure i perfectly understand all, but i'm sure i will be able to use it ;)

Thank you, hope this will be in the next release!

(I know that i already wrote that, but i'm really impressed by your work, really pro! I'm sure flexicontent will became a must have for all).

Merci à la communauté!

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

More
12 years 8 months ago #37700 by ggppdk
Hello,
we modify the result list as described above,

- so inside your code you can use "has_access" item property

$items[$i]->has_access
or
$results[$i]->has_access

- just i was thinking about the CSS classes, that adding the to a single container makes CSS rules not so easy.
maybe it is best to add them like this (inside the ITEM (HTML tag DIV,LI) container):
Code:
<li ...> <span class="fc_item_has_access"> <span class="fc_itemcat_45"> <span class="fc_itemcat_17"> ... item content </li> <li ...> <span class="fc_item_no_access"> <span class="fc_itemcat_45"> <span class="fc_itemcat_17"> ... item content </li>


-- 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
12 years 5 months ago #40121 by walkyripa
Hi!

As i installed the new version of FC, i'm trying to use the hability to catch the information if an item has user rights or not...

I've tried someting like

"<?php if ($result->has_access) :? > "

in the "default_results.php" file, but it didn't match anything...

Can you tell me what i'm doing wrong?

thank you!

Merci à la communauté!

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