Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup /misc.php?action=showpopups&type=online #996

Closed
alain01 opened this issue Mar 22, 2021 · 8 comments
Closed

Popup /misc.php?action=showpopups&type=online #996

alain01 opened this issue Mar 22, 2021 · 8 comments
Assignees
Labels

Comments

@alain01
Copy link
Contributor

alain01 commented Mar 22, 2021

Hi,

I worked on a new template for the template "system_block_online.tpl".
I will send a PR for that
Capture d’écran 2021-03-22 232951

but before,
I have a question for the "plus" link.

The template for the "+" link (list of all users on line) is built by this :
/misc.php?action=showpopups&type=online

so it's hard coded in misc.php file.

How can I make a bootstrap4 pop up for this popup ?
If I change the code in the misc.php file and the theme is not BT4,
I think it would generated an issue, no ?

Let me know a good solution, please.

@geekwright geekwright added the bug label Mar 23, 2021
@geekwright geekwright self-assigned this Mar 23, 2021
@geekwright
Copy link
Contributor

That is definitely a bug. Give me a couple of days.

@alain01
Copy link
Contributor Author

alain01 commented Mar 25, 2021

YEaaaaaaaaaaaa !!!
Thank you !

Ok, now I 'm going to work on these 4 bt4 templates !
I like this commnunity work !

@alain01
Copy link
Contributor Author

alain01 commented Mar 27, 2021

Ok,
Now I have a request.
Is it possible to cut this smarty in 2 parts ?
Now : <{$block.online_total}> = "3 user(s) are online"

I want :
"3 users are online"
"1 user is online"

I want to test in my new bt4 template
like

<{$block.online_total_nb}> <{if $block.online_total_nb > 1}><{$smarty.const.THEME_OL_USERS}><{else}><{$smarty.const.THEME_OL_USER}><{/if}>

where (in \themes\xswatch4\language\english)
<{$smarty.const.THEME_OL_USERS}> = users are online
<{$smarty.const.THEME_OL_USER}> = user is online

No problem to test for members and guests cause smarty are in 2 parts :
<{$block.lang_members}><{$block.online_members}>
<{$block.lang_guests}>: <{$block.online_guests}>

@geekwright
Copy link
Contributor

If I understand correctly, this should give you the total number online that you could access as <{$online_total_nb}>

<{assign var=online_total_nb value=`$block.online_members+$block.online_guests`}>

In case the formatting gets messed up, the part $block.online_members+$block.online_guests should be surrounded by single backtick characters. Github uses those to mark code to format, so the display might get confused.

@alain01
Copy link
Contributor Author

alain01 commented Mar 27, 2021

haaaa
I'm stupid !!!
Obviously, online_members + online_guests = on_line_total
Lol
Thank you for giving me the idea of ​​the addition.
I did not think about it ! grrrrrr

@alain01
Copy link
Contributor Author

alain01 commented Mar 27, 2021

Ok, I can add a new smarty (online_members + online_guests)

But
this variable exists in

$onlines = $online_handler->getAll();

the variable is yet defined.
I just want use this variable in my template.
Isn't it better to take this existing variable (and export it to the templates?) rather than creating a new one ?

@geekwright
Copy link
Contributor

I don't really see that as a big deal. The number will still be the number, and the root problem still won't be solved either way.

The root problem is the lack of grammatical number support in XOOPS language handling. More on concept:

This falls into the area of "duct tape" solutions, where the real job is to get the results YOU want, because a perfect solution isn't available. The "user(s)" type solution isn't perfect, but it is established. You want it done a different way. A theme is a good place for that kind of fix.

Proper solutions will come, but not in 2.5.11. The data is already available with a simple addition for this. I'm hoping to get a release out so we can restart the focus on our next generation, where actual solutions are on the drawing board.

@alain01
Copy link
Contributor Author

alain01 commented Mar 28, 2021

Ok, I can close this issue.
Thank you Richard for the work.
I'm working on a modal windows for the new system_misc_online.tpl but for the moment, it doesn't work !
Blocsystem_block_online.tpl (done as bt4 tpl) / "plus" link to open the New system_misc_online.tpl

I'm searching how to use modal in the "plus" link...

@alain01 alain01 closed this as completed Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants