mambax7 / tag

The Tag module is designed for site-wide tag management, handling tag input, display and stats for each module that enables tag plugin.
2 stars 3 forks source link

Questions #11

Closed alain01 closed 2 years ago

alain01 commented 2 years ago

Hi ! -A- For the /modules/tag/view.tag.php (template tag_view.tpl) How is the order ? By descending date (newest first), regardless of the modules or groups per module? Attention, there are 2 questions in this sentence lol

mambax7 commented 2 years ago

Alphabetical

In the block, you can also have sorted by number of tags image

alain01 commented 2 years ago

-B- I want this Capture d’écran 2021-12-11 121145 to highlight the keyword found

The Idea is close to that :

                <{foreach item=tag from=$tagbar.tags}>
                        <{if $tag == $tag_title}>
                            <li><{$tag|replace:"'>":"' > <span class=\"fa fa-tag text-warning\"></span> "}></li>
                        <{else}>
                            <li><{$tag|replace:"'>":"' > <span class=\"fa fa-tag"></span> "}></li>
                    <{/if}>
                <{/foreach}>

but $tag is an url : <a href='http://xoops-tests2.local/modules/tag/view.tag.php/sport' title='sport' > and $tag_title is a a string of characters sport

It's too hard for me with |replace or |cat... Any solution ?

alain01 commented 2 years ago

Quick answer ! For -A- No, I talk about the result, not the key/tag...

May be this Capture d’écran 2021-12-11 142951 print screen could help for my question

mambax7 commented 2 years ago

Talk to Heyula - he is good with templating, Other questions will need to wait till next week, as I have to focus on other things! Sorry!

alain01 commented 2 years ago

ok no pb

alain01 commented 2 years ago

With help from @GregMage: Capture d’écran 2021-12-12 170721

mambax7 commented 2 years ago

That looks great! Can you close it now?

alain01 commented 2 years ago

humm no, the order is a problem.

If there is 20 contents (or more) with the same tag (in this exemple, tag "sport") we want to display the last contents, by descending date (newest first), regardless of the modules or groups per module.

mambax7 commented 2 years ago

I'm brain dead now, so maybe in the next release...

alain01 commented 2 years ago

Ok, ;-))) I will open a new issue with just one subject : Order then I close this issue.

alain01 commented 2 years ago

Let me test my new bt4 templates with your modifications before publish a beta version, please. I need to test with multi-pages and with the default value in <{$tag_term|default:''}>.

mambax7 commented 2 years ago

Too late :) We can make changes in Beta 5

mambax7 commented 2 years ago

Please test all you templates on PHP 8+, as the Smarty default issues show up there

alain01 commented 2 years ago

Humm, ok. My tests are actually in 7.3

mambax7 commented 2 years ago

The Smarty default issues don't show up till PHP 8, so you need to start testing ALL templates with PHP 8+ I'm actually testing everything on PHP 8.1, to make sure that everything works there.

alain01 commented 2 years ago

I closed it to follow the unique subject here: https://github.com/mambax7/tag/issues/18