News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Dangerous Marsupial Page Index

Started by Antechinus, February 13, 2020, 11:24:02 AM

Previous topic - Next topic

Antechinus

Link to Mod

This mod replaces the default page index with an HTML select (or dropdown, if you prefer).
It also has next page and previous page buttons built in, each side of the select.
The mod comes with CSS to support RTL languages.




Changelog

v.1.0.2 - 14/2/2020 - Incorporated Bugo's suggestions of cache cleaning code in install.xml, and removing fixed width from CSS for .subject .antPages_select (small selects on message index).

-Rock Lee-

It seems very good I will try it on a test site I have, great job! :D


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Antechinus

I thought it was a sensible idea. I actually coded the thing literally years ago, but for some reason had never got around to submitting it.

Bugo

Please, add this line to <install> section in package-info.xml:

<code type="inline">clean_cache();</code>

It will help to clean cache after the mod installing (to avoid doing this manually).

In addition, on the topic list page (MessageIndex), I noticed that when long words are using (i.e., "Страница" instead of "Page"), the right page select is not displayed completely. See my screenshot below. Removing the "width" property (".subject .antPages_select" rule in index.css) fixes the problem.

In any case, this mod is classy. Big thanks :)

vbgamer45

Quote from: Bugo on February 13, 2020, 03:36:31 PM
Please, add this line to <install> section in package-info.xml:

<code type="inline">clean_cache();</code>

It will help to clean cache after the mod installing (to avoid doing this manually).

Wow that is a good idea. Should that be in SMF by default? every-time  a mod is installed?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Antechinus

#5
Quote from: Bugo on February 13, 2020, 03:36:31 PM
Please, add this line to <install> section in package-info.xml:

<code type="inline">clean_cache();</code>

It will help to clean cache after the mod installing (to avoid doing this manually).

You mean like this?

<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>Antechinus:Dangerous_Marsupial_Page_Index</id>
<name>Dangerous Marsupial Page Index</name>
<version>1.0.1</version>
<type>modification</type>
<install for="2.0, 2.0.1 -2.0.99">
<modification format="xml" type="file">Dangerous_Marsupial_Page_Index.xml</modification>
<readme parsebbc="true">readme.txt</readme>
<code type="inline">clean_cache();</code>
</install>


Ok, cool. will do.

QuoteIn addition, on the topic list page (MessageIndex), I noticed that when long words are using (i.e., "%u0421%u0442%u0440%u0430%u043D%u0438%u0446%u0430" instead of "Page"), the right page select is not displayed completely. See my screenshot below. Removing the "width" property (".subject .antPages_select" rule in index.css) fixes the problem.

Now there's a point. Come to think of it, I'm not sure why I set a fixed width there anyway. I'll change it now. :)

ETA: Aha! I just remembered. I was using the fixed width on local to hide the "of 26" text after the "Page 1", to make the default display more compact on the message index. I just thought it looked neater like that. But sure, I can see it causing problems with other languages.

What I'll do is remove the width in the default CSS, and add a comment there suggesting that people can tweak the display themselves for their preferred language if they want to. Which still won't be a perfect solution for multi-language sites, but anyone who is really keen can always run a browser extension like Stylem.

ETA: Ok, done. Version 1.0.2 uploaded. :)

dan4ever

#6
Hi

Is it possible to increase the width slightly?
The text becomes too long, see picture

/Dan


Edited to remove size restriction bbc ~ Steve
/Dan Olsson, Webmaster at https://www.guldforum.se

landyvlad

Is this mod independent of theme in use?  (i.e. will it wok with any theme) ?

Do you plan to release a 2.1 compatible version in due course?


Also... which marsupials do you consider dangerous?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Antechinus

Quote from: dan4ever on June 13, 2021, 05:59:05 AM
Hi

Is it possible to increase the width slightly?
The text becomes too long, see picture
Yes, it's easy enough to do. Will dig out the code later.


Quote from: landyvlad on June 14, 2021, 12:51:07 AM
Is this mod independent of theme in use?  (i.e. will it work with any theme) ?
Yes, but it may need CSS tweaks to look good with some themes.

QuoteDo you plan to release a 2.1 compatible version in due course?
Probably should. :P


QuoteAlso... which marsupials do you consider dangerous?
Drop bears.

Advertisement: