xoops forums

blackrx

Quite a regular
Posted on: 1/5 11:36
blackrx
blackrx (Show more)
Quite a regular
Posts: 227
Since: 2008/2/5 1
#1

countdown module for XOOPS 2.5.9 ?

Hi

I'm Looking for a simple countdown module for XOOPS

I would like to have this feature

- create countdown
- show list of countdown
- select countdown to show in block
- Show countdown in Years Week Days Minutes Second
- In block option option to disable or enable display of Years Week Days Minutes Second

i know there is many countdown script out there and can be paste in blocks..i'm currently using one but it would be nice to have a record of previous countdown detail in module

i found an old module in the repository called countdown it have some of the features that i would have in the module

Resized Image

it can be installed but there is problem submitting new countdown

anyone can help me to convert this module to latest XOOPS Standard or is there any other countdown module ?

Mamba

Moderator
Posted on: 1/6 14:19
Mamba
Mamba (Show more)
Moderator
Posts: 10587
Since: 2004/4/23
#2

Re: countdown module for XOOPS 2.5.9 ?

You can try and test these two versions:

Version 1: the original version, updated for XOOPS 2.5.9 and PHP 7.2, but the the calendar button doesn't work, i.e. you have to enter the date manually

Version 2: Quick & dirty rewrite of the Version 1, incl. a Vue countdown component.

Please note: I don't have time to do anything more with these modules, but it will be a good start for you to improve it further. Or somebody else could help you. Just fork it on GitHub
Support XOOPS => DONATE
Use 2.5.9 | Docs | Modules | Bugs

blackrx

Quite a regular
Posted on: 1/8 15:14
blackrx
blackrx (Show more)
Quite a regular
Posts: 227
Since: 2008/2/5 1
#3

Re: countdown module for XOOPS 2.5.9 ?

Thank you very much Mamba I'll try to modify it from here

out of curiosity how do you generate the 2nd module?..is it using tdmcreate?

Mamba

Moderator
Posted on: 1/8 16:50
Mamba
Mamba (Show more)
Moderator
Posts: 10587
Since: 2004/4/23
#4

Re: countdown module for XOOPS 2.5.9 ?

Yes, TDMCreate, it saves a lot of time
Support XOOPS => DONATE
Use 2.5.9 | Docs | Modules | Bugs

heyula

Theme Designer
Posted on: 1/8 17:20
heyula
heyula (Show more)
Theme Designer
Posts: 432
Since: 2008/4/24
#5

Re: countdown module for XOOPS 2.5.9 ?

you share the download link for the version you are using.

it would be nice if you take a detailed video of how you are used.

Mamba

Moderator
Posted on: 1/8 19:41
Mamba
Mamba (Show more)
Moderator
Posts: 10587
Since: 2004/4/23
#6

Re: countdown module for XOOPS 2.5.9 ?

Heyla, are you talking about the Countdown module, or TDMCreate?

If about TDMCreate, then there is the older video that I've made, and the principles are pretty much the same:




You can download and test TDMCreate here: https://github.com/txmodxoops/tdmcreate
Support XOOPS => DONATE
Use 2.5.9 | Docs | Modules | Bugs

ultraman147

Just popping in
Posted on: 6/5 10:07
ultraman147
ultraman147 (Show more)
Just popping in
Posts: 4
Since: 2007/7/15
#7

Re: countdown module for XOOPS 2.5.9 ?

Thanks for your sharing. I have tried to install both version 1 and 2 in my server which the PHP version is 5.5.26 and xoops 2.5.8. Some errors occured.
Version 1 --> links error. --> http://mywebsite/modules/index.php (missing "countdown")
Version 2 --> Install failure

zyspec

Module Developer
Posted on: 6/5 14:18
zyspec
zyspec (Show more)
Module Developer
Posts: 1027
Since: 2004/9/21
#8

Re: countdown module for XOOPS 2.5.9 ?

I haven't tried this but it looks to me like you should be able to change ./templates/countdown_index.tpl from:
<tr>
+        <
td class="head">
+            <
a href="../index.php?sort=name&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_NAME}></a>
+        </
td>
+        <
td class="head">
+            <
a href="../index.php?sort=description&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_DESCRIPTION}></a>
+        </
td>
+        <
td class="head">
+            <
a href="../index.php?sort=enddatetime&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_EXPIRATION}></a>
+        </
td>
+        <
td class="head">
+            <
a href="../index.php?sort=remaining&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_REMAINING}></a>
+        </
td>
+    </
tr>

to:
<tr>
+        <
td class="head">
+            <
a href="./index.php?sort=name&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_NAME}></a>
+        </
td>
+        <
td class="head">
+            <
a href="./index.php?sort=description&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_DESCRIPTION}></a>
+        </
td>
+        <
td class="head">
+            <
a href="./index.php?sort=enddatetime&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_EXPIRATION}></a>
+        </
td>
+        <
td class="head">
+            <
a href="./index.php?sort=remaining&order=<{$cd_sort_order}>"><{$smarty.const._CD_TEXT_REMAINING}></a>
+        </
td>
+    </
tr>


All this change does is removes an 'extra' period in the href links to make sure it references the current relative directory. This should fix the 'missing' /countdown directory reference.

ultraman147

Just popping in
Posted on: 6/8 8:25
ultraman147
ultraman147 (Show more)
Just popping in
Posts: 4
Since: 2007/7/15
#9

Re: countdown module for XOOPS 2.5.9 ?

Thanks for your help first. I have rewrite the ./templates/countdown_index.tpl file and the link is properly only in the module front page. The text button on the user menu is work properly. But all the text button on the content area is still not work as the links still not complete like mywebsit/modules/index.php?op=edit&id=1

zyspec

Module Developer
Posted on: 6/8 15:21
zyspec
zyspec (Show more)
Module Developer
Posts: 1027
Since: 2004/9/21
#10

Re: countdown module for XOOPS 2.5.9 ?

@ultraman147,

You're correct. I apologize, I missed 2 more places that need to be changed.

In the same file (./templates/countdown_index.tpl) around line 26 you will see:
<a href="../index.php?op=edit&amp;id=<{$event.id}>"><{$event.name}></a>

please change it to:
<a href="./index.php?op=edit&amp;id=<{$event.id}>"><{$event.name}></a>


and similarly around line 46 you will see:
<a href="../index.php?op=add"><{$smarty.const._CD_TEXT_ADD_EVENT}></a>

please change to:
<a href="./index.php?op=add"><{$smarty.const._CD_TEXT_ADD_EVENT}></a>


I hope this helps.