[Solved] warn if restricted item in search results

More
12 years 1 week 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...

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

More
12 years 1 week 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 1 week 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...

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

More
11 years 9 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.

More
11 years 9 months ago #40131 by ggppdk
Hello

has_access

was added, which version are you using

-- also content list markups were added (you can enable in Component configuration or in Category)
and these include access markups, and will be copied to search view too (now they are only in category-like views)


-- 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...

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

More
11 years 9 months ago #40140 by walkyripa
Hi and thank you for your answer...

My version is : 2.0.3 beta2 r1686 (on J2.5.14)

Perhaps i'm not skilled enough to use has_access correctly... As i told you, what i tried is putting:

" <?php if ($result->has_access) :? >
access ok
<?php else:?>
access nok
<?php endif; ?>

in the "default_results.php" file in the "views--> search --> tmpl" folder, but it always return "access nok" even if article is public...

thanks for answer!

Merci à la communauté!

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.378 seconds
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