SimpleTickers

Started by Vladimir Samoilov, June 12, 2012, 10:05:15 AM

Previous topic - Next topic

Vladimir Samoilov

Ссылка на мод



Simple Tickers 1.6
mamavrn.ru

Date calculating script was kindly provided by Michail Filatov ( svb28.ru )

This Modification allows members to create own Tickers. Tickers display a graphical countdown on website. They can be for any event such as Pregnancy, Weddings and Birthdays.

For example:



After installation use menu button "Tickers" for access tickers page yourdomain.com/index.php?action=simpletickers

You can upload your own png files to use it as backgrounds and sliders. Upload your backgrounds to "PathToSMF/SimpleTickers/scenies". Upload your sliders to "PathToSMF/SimpleTickers/sliders".
You can upload your own fonts also. You have to upload 2 files to "PathToSMF/SimpleTickers/fonts": ttf file (font) and png file (example of font). Both files must have the same names, for example "arial.ttf" and "arial.png".


Languages:

     - English
     - Russian


Change Log

v1.6
Now you can choose backgrounds, sliders and tickers settings on different pages
Two events support
Added font size settings
Font names translated into English

v1.5
Works on utf-8 and cp-1251
Permissions 644 are set for SimpleTickers/img.php
Caching period for images is 24 hours
The button "Ticker" is active

v1.4
Added short urls
Caching of tickers

v1.3
Fixed bag in URL generate with using $boardurl variable
Added russian readme file
Deleted several hard coded language strings in the Subs-SimpleTickers.php file
Fixed some bags in English version
Rewrited SimpleTickers.template.php file without "short_open_tag"

v1.2
Added tables for show backgrounds and sliders collections
Added new pictueres for backgrounds and sliders

v1.1
Deleted .htaccess redirect file
Added license

v1.0
First Release

This mod is licensed under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

phpshiva

this doesent show any ticker just a cross in smf2.0.2

Vladimir Samoilov

Hi!
Try to set file permission to 644 for SimpleTickers/img.php

Sudhakar Arjunan

Nice mod.

Many people will find it useful.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

BobGiles

Quote from: mamavrn on June 22, 2012, 09:18:58 AM
Hi!
Try to set file permission to 644 for SimpleTickers/img.php

I am using SMF 2.0.2 and have set the file permissions as above. I get a box saying "The scene, the slider or the font was not found" If I leave it at 666, I get nothing at all.

Any help would be appreciated.

Bobehnbdw

Vladimir Samoilov

#5
Check if you have folders SimpleTickers/sliders, SimpleTickers/scenies and SimpleTickers/fonts on your server.

Give me url of your forum, please. I will try to help you.

BobGiles

#6
Thanks for the speedy reply!

The url is: http://www.corfu-forum.com/forum [nofollow]

I have the folders SimpleTickers/sliders, SimpleTickers/scenies and SimpleTickers/fonts on my server.

I have also enabled 'Tickers'

Bob

Vladimir Samoilov

Which database do you use? MySQL or PostgreSQL?

I think problem is in the database because test script works perfectly
http://www.corfu-forum.com/forum/SimpleTickers/img.php

Try to uncheck "Short url" in mod settings. It must help.

BobGiles

Quote from: mamavrn on June 26, 2012, 02:53:52 PM
Which database do you use? MySQL or PostgreSQL?

I think problem is in the database because test script works perfectly
http://www.corfu-forum.com/forum/SimpleTickers/img.php [nofollow]

Try to uncheck "Short url" in mod settings. It must help.

I am using MySQL

I have unchecked "Short url"

I have changed permissions to 644 and all seems OK

Thank you!

Bob

Vladimir Samoilov

#9
You are welcome. :)
But I don't know why it doesn't work when parameters of ticker stored in your database (when checked "short url").

If you want to use "Short url" show me errors from log file. I will try to solve the problem.
If it doesn't matter you can leave it this way.

You may upload your own images for tikers and sliders now.

Thank you for using my mod. :)


XHIBIT911

Can somebody post a demo link ?


BobGiles

Mamavrn,

Thanks for the speedy support! Short urls is not an issue and so I shall leave things as they are.

I have a suggestion that may or may not be possible to implement!

Firstly would it be possible to add hours and years to the countdown? If this is possible, would it then be possible to have an option not to display a slider or ticker? In this way, the mod would provide a countdown facility which I don't think is available elsewhere.

Bob

Vladimir Samoilov

BobGiles,

did you install mod version 1.5? I tried to install permission for img.php to 644 automatically inside mod in this version. Does it work or not?

Quote from: BobGiles on June 28, 2012, 11:48:24 AM
Mamavrn,

Thanks for the speedy support! Short urls is not an issue and so I shall leave things as they are.

I have a suggestion that may or may not be possible to implement!

Firstly would it be possible to add hours and years to the countdown? If this is possible, would it then be possible to have an option not to display a slider or ticker? In this way, the mod would provide a countdown facility which I don't think is available elsewhere.

Bob

What do you mean? Could you drow graphical example please?

BobGiles

Quote from: mamavrn on June 29, 2012, 02:37:06 AM

did you install mod version 1.5? I tried to install permission for img.php to 644 automatically inside mod in this version. Does it work or not?

I installed version 1.5. img.php has the permissions set to 644. It still does not like short urls. This is not a problem for me.

Quote from: BobGiles on June 28, 2012, 11:48:24 AM
Mamavrn,

Thanks for the speedy support! Short urls is not an issue and so I shall leave things as they are.

I have a suggestion that may or may not be possible to implement!

Firstly would it be possible to add hours and years to the countdown? If this is possible, would it then be possible to have an option not to display a slider or ticker? In this way, the mod would provide a countdown facility which I don't think is available elsewhere.

Quote from: mamavrn on June 29, 2012, 02:37:06 AM

What do you mean? Could you drow graphical example please?

I will try and explain! Firstly I should have said, could hours and minutes be added!

I think it would be useful for users to be able to merely include a line of text without sliders or scenies followed by the time. For example:

<Event in text.> followed by time.
Eg My flight to Greece leaves in: 1 year 2 months 3 weeks 1 day 3 Hours and 7minutes

This is a silly example but gives the idea.

The reason that I have suggested an option for no sliders or scenies is that my forum is travel related and people like to include this sort of information on the posts. A page filled with graphical tag lines becomes very cluttered.

Please don't take my suggestion as a criticism! I think the mod is great as it is. I just thought that something that is good might get even better!  ;)

Bob

Vladimir Samoilov

I got it. I will try to do it in next version of the mod. Thank you for good idea.

BobGiles

Quote from: mamavrn on June 30, 2012, 03:43:41 PM
I got it. I will try to do it in next version of the mod. Thank you for good idea.

Great news! I'll look out for it!

Bob

lifeguard81

Strange,

In chrome it works fine, but internet explorer say, the scene, or slider or font was not found :S
Try permissions to 777 and 755 but nothing works.

What can i do?
www.doenwenu.nl
Excuse me for my english. i am from holland :)

Vladimir Samoilov

#18
I fixed it in version 1.5. Please, download this version again.

Kimmie

Just tried to parse this on the mod page and it won't parse. All I get is

Code
install.php
This file should not be able to execute standalone. You may have to run the following queries manually.

hooks.php

Vladimir Samoilov

It's OK.
This mod was all made on hooks and you don't need to modify the source files

tMicky

#21
how does one access the menu for this mod.

how do I  get to the selection screen posted below

http://custom.simplemachines.org/mods/index.php?action=download;mod=3340;id=203096;image


tMicky

Quote from: Dylert on October 13, 2012, 10:07:23 AM
Try yourdomain.com/index.php?action=simpletickers
Thank you so much. That really should be mentioned somewhere.
Since, you can't use the mod, without the information, or perhaps I just missed something.


Dylert

I was wondering about the same when I installed this mod, but got it right after trying different URLs.

tMicky

Is there a way of exporting these tickers to use on another forum?
That would be so nice.

like have it be .jpg, .png instead of .php, is this possible?

Dylert


Vladimir Samoilov

#27
Quote from: tMicky on October 13, 2012, 03:34:41 PM
Quote from: Dylert on October 13, 2012, 10:07:23 AM
Try yourdomain.com/index.php?action=simpletickers
Thank you so much. That really should be mentioned somewhere.
Since, you can't use the mod, without the information, or perhaps I just missed something.

tMicky, this mod adds new button in main menu after installation. Do you have this button on your forum?



You can show or hide this button in mod settings area.



Is it work?

-----------------------

I have added this information in description on mod page.

Vladimir Samoilov

Quote from: tMicky on October 13, 2012, 03:53:23 PM
Is there a way of exporting these tickers to use on another forum?
That would be so nice.

like have it be .jpg, .png instead of .php, is this possible?

You can use these tickers on another forums with .php, it works.
And you can set redirect .php to .png in your .haccess file also.

tMicky

Quote from: mamavrn on October 15, 2012, 03:03:34 AM
Quote from: tMicky on October 13, 2012, 03:53:23 PM
Is there a way of exporting these tickers to use on another forum?
That would be so nice.

like have it be .jpg, .png instead of .php, is this possible?

You can use these tickers on another forums with .php, it works.
And you can set redirect .php to .png in your .haccess file also.

Thank you for replying. The button didn't get added when I did the installation. So I had to use a menu mod to add it in.

I tried to post the image on another forum, and I got a - this image extension is not allowed, it has to be jpg, gif, png etc.

How do I do an image redirect?

Vladimir Samoilov

#30
I think you use old version of smf (2.0 RC3, RC4 or RC5) without hooks for menu so you don't have menu button "Tickers" after mod installation.

For redirect try to create file .htaccess  (without extension) in SimpleTickers folder and add strings


RewriteEngine On
RewriteRule ^pa=([A-Za-z0-9]{4}).png img.php?pa=$1


Then you can use url on another forum like this

http://yourdomain.com/SimpleTickers/pa=YEH6.png

This url will be redirected to http://yourdomain.com/SimpleTickers/img.php?pa=YEH6

I could make a mistake in the regular expression, I have not tested this.
This rule will work if you check "short urls" option. If you uncheck this then you need to write another RewriteRule

tMicky

Quote from: mamavrn on October 16, 2012, 03:07:11 AM
I think you use old version of smf (2.0 RC3, RC4 or RC5) without hooks for menu so you don't have menu button "Tickers" after mod installation.

For redirect try to create file .htaccess  (without extension) in SimpleTickers folder and add strings


RewriteEngine On
RewriteRule ^pa=([A-Za-z0-9]{4}).png img.php?pa=$1


Then you can use url on another forum like this

http://yourdomain.com/SimpleTickers/pa=YEH6.png

This url will be redirected to http://yourdomain.com/SimpleTickers/img.php?pa=YEH6

I could make a mistake in the regular expression, I have not tested this.
This rule will work if you check "short urls" option. If you uncheck this then you need to write another RewriteRule
It worked, thank you so much. Simple, effective and just what I have been looking for. Thanks  :)

Vladimir Samoilov


tMicky

I don't know if this is possible, or something to consider for the future.

But is there a way to have scenes and sliders as gifs.
And have the ticker count down, so instead of just days, it will state months, weeks, days, hour etc.


Vladimir Samoilov

Thank you for your advice.
I will try to do it in next version.

mgrmgr

Can someone please tell me what is supposed to be new in the update of Oct 15th? The latest files in that package are from Jun 28th (or so) which are the same when I downloaded the package in September.

* mgrmgr is confused :(

Vladimir Samoilov

I just added string to description

"After installation use menu button "Tickers" for access tickers page yourdomain.com/index.php?action=simpletickers"

I didn't change source files.

mgrmgr

Thanks for the explanation

* mgrmgr isn't confused any longer :)

Vladimir Samoilov

#38
New version of Simple Tickers http://custom.simplemachines.org/mods/index.php?mod=3340

Changes:
- Now you can choose backgrounds, sliders and tickers settings on different pages
- Two events support
- Added font size settings
- Fonts names in English

TheDel

I love this mod- well my members do

Is there anyway to fix the timing so that it reflects years also?
I set up 2 events (Nice addition, BTW) and one is a 3 yrs 11 months ahead of the other but because of the 11 months, it appears furthee down the line.

Maybe this is impossible- Ive never used tickers (and never saw them w/2 events in one)
Just thought Id ask

Vladimir Samoilov

Thank you for your note.
I will try to do dynamic scale in new version of this mod.

tMicky

This is probably a silly question. But how does one apply mod updates/upgrades?

I have version 1.5, how do I update to version 1.6.

thank you.

Vladimir Samoilov

to tMicky

1. If you have changed or appended another backgrounds, sliders or fonts, then save on local computer following folders
yourforum/SimpleTickers/scenies
yourforum/SimpleTickers/sliders
yourforum/SimpleTickers/fonts

2. Remove old version  through the standard package manager

3.  Install new version  through the standard package manager

4. Upload and replace folders "scenies", "sliders" and "fonts"

TheListener

Although the mod looks promising for the type of forum I have I have one dislike.

I do not like the Ticker menu tab.

IMHO this should be accessed via a persons profile only.


iain sherriff

Hi
What do the "column count" setting alter with this please ?
SMF 2.0.12

Vladimir Samoilov

Quote from: iain sherriff on February 22, 2014, 07:18:48 PM
Hi
What do the "column count" setting alter with this please ?

1 column



2 columns



3 columns


iain sherriff

SMF 2.0.12

zurgenaboy

I like this mod, but it has its drawbacks.

1)  the url created on the last page can be copied and pasted
on to any other forum, thereby stealing some of your bandwidth.

2)  The 4 new directories that this mod creates leaves those 4 directories
open to view by anyone. (a blank index file has to be created to stop this)

3)  Guests can view/use this to create their own tickers, then use number 1 above.

question:   How can this be stopped?

maybe by putting this in the forum profile page??

Vladimir Samoilov

Quote from: zurgenaboy on September 29, 2015, 05:52:25 AM
I like this mod, but it has its drawbacks.

1)  the url created on the last page can be copied and pasted
on to any other forum, thereby stealing some of your bandwidth.

2)  The 4 new directories that this mod creates leaves those 4 directories
open to view by anyone. (a blank index file has to be created to stop this)

3)  Guests can view/use this to create their own tickers, then use number 1 above.

question:   How can this be stopped?

maybe by putting this in the forum profile page??

Hello, zurgenaboy!
Sorry for my late answer. I didn't see your message.
Thank you for your remark. I've added index files to image's directories. You may download mod again. I didn't change version because there are no changes except adding index files.

As for stealing of bandwidthes I think it is advantage, not drawbacks :) Because they will put link to your website and will make your website more popular. Don't you think so? The url created on the last incudes link to your forum.

tpgames

Questions:
1. How do you fix the img.php so that the font that shows up under the image is a solid colour instead of a two-toned mess? I uploaded what the font looks like in use.

2. Whatever font size I choose, doesn't change anything.  Its still a tiny font size. I uploaded also my version as a text file. I tried changing the font size to 16 (at all the places on the php), just to see what I would get. Even raising the browser's text to 250% didn't really help make it clearer to read.

I was assuming that fontcolor2 stood for the 2nd ticker if chosen.
What I changed was: $pixpm=$line_sx/30;  // from 12 to 30


3. Would the file actually work for counting down 30 days? On the tickers I only see 1 - 12, so I made mine to be 1 - 30.

Thanks! And I do love the concept! I am just not doing pregnancy type stuff. I'm doing writing countdowns. Thanks again!

tpgames

Couldn't find where to edit post.

UPDATE: With Answers.

1. The text under the image will be two toned, with the 2nd tone (the inner colour) whatever colour the user chooses.
2. The Modification settings in the Admin area is the only area where the font size actually changes. The font size in the php file, is ignored, apparently.

3. I am still unsure as to how the code works. We can customize the number of columns for the images, but that does not give us any customization for the count down. Your images indicate a 12 day count down.  I did edit the php file to use 30 instead of 12.  (Just like I posted above).
Thanks!

Vladimir Samoilov

Hello tpgames!

I saw you added several lines to img.php like this

if(isset($_GET['b3'])) $b3=$_GET['b3'];
if(isset($_GET['d3'])) $d3=$_GET['d3'];
if(isset($_GET['t3'])) $text3=$_GET['t3']; else  $text3='';
if(isset($_GET['f3'])) $fontname3=$_GET['f3']; else $fontname3='HOMON';
if(isset($_GET['c3'])) $c3=$_GET['c3']; else $c3='ffffff';


It is not necessary to do. Because my code means you can use 2 events in one ticker. For example ages of 2 children in one ticker simultaneously. It is optionally.

1. I didn't clearly understant first issue. Have you resolved it?
2. Yes, you have to choose the font size in Admin area. But if it isn't set then will be used default value (I use 10 as default, you set 16)
3. You have to modify diff() function in Subs-SimpleTickers.php file. This function return array whith date and month number (1-12). So you have to modify this function for returning day number (1-31) instead of month number.

tpgames

What I am doing is various projects that have nothing to do with "children, weddings, ages" etc. I was trying to alter your mod to work for our needs, and doing a very bad job of it. ;D Sorry!

Here is what we'd do. My idea that would make it simple is below all this.
1. We count down the number of days left in Nanowrimo (30 days).
2. We count days left on a 15 day project that could be just about anything from writing, to planning a game or learning something.

3. Or if we could, we'd count the number of words learned (which your ticker does not do.) I would do 15 words per day with a 450 word goal per month. Or 20 words per day, with a 600 word goal per month - which ever was easier to program. The words learned would be inserted on the honor system, because a new day happening, wouldn't mean I did anything towards the goal.

4. We would love to insert word count (not counting how many words, we just tell it the word count) and count up to one of the following word goals:  10,000 words; 25,000 words; 50,000 words; 75,000 words; 100,000 words; 175,000 words; 200,000 words; 500,000 words; 1,000,000 words. Ticker moving up for every 3334 words (30 slots on ticker) or 5,000 words for the smaller word counts (which gives us 20 spots for the ticker for 100,000 or 40 for 200,000 word goal.) works. But for the higher word count of 1 million, I'd settle for every 25,000 words to make it 40 slots.

Why two or more tickers?
We like to have each ticker be specific for the project such that it isn't counting down 30 days when its a 15 day project (we'd use same ticker for either and just call it good enough). Or, when its counting number of words learned.

MOD idea  (to make it easier) Perhaps....
If we could just push a button to make the ticker move one slot up after telling it how many slots we wanted, that would be easy to program and would work for whatever project? (I would tell it as an admin with the following specifics to make it really easy....)
And if you need specifics:
Slider would only be moved:
15 times
30 times
40 times
50 times

Then for the word goals: We would just click the button every time we learned 15 or 30 words. Thus, 15 times for 15 words would give us 450 words, using the same ticker.

Thanks! All the tickers I found online, just didn't do what I wanted, or worse, they didn't even work at all (sites down, insisted they host it, etc.)

SusanTN

I have a ticker created with the start date of 1-1-2016 it is now 6-1-2016, a full 6 months. The ticker shows 5 months on it, which is incorrect. The counter image position correctly shows 6 months.

I am using SimpleTickers_1.6.tar.gz

IE:



This is the database record for the counter

+-----------+---------+--------+-----------+------------------------+--------+----------------+------+------------+-------+--------+-------+
| RANDOMURL | LINE    | BEG    | STARTDATE | FONT                   | COLOR  | CAPT           | BEG2 | STARTDATE2 | FONT2 | COLOR2 | CAPT2 |
+-----------+---------+--------+-----------+------------------------+--------+----------------+------+------------+-------+--------+-------+
| eyQ3      | 26a.png | 31.png | 1,1,2016  | LiberationMono-Regular | 0000ff | Fulltime since | NULL | NULL       | NULL  | NULL   | NULL  |
+-----------+---------+--------+-----------+------------------------+--------+----------------+------+------------+-------+--------+-------+

Arantor

No, it's 5 months.

1st Jan to 1st Feb - 1 month
1st Feb to 1st Mar - 1 month
1st Mar to 1st Apr - 1 month
1st Apr to 1st May - 1 month
1st May to 1st Jun - 1 month

SusanTN

#55
Then the image is wrong and should show 5 months as well. My preferred solution would be to give an option to offset the date during counter creation.

IE: Date Offset: [+,-] ______ [Days, Months, Years]

[] indicates select box.

It would also be nice to be able to edit your tickers, rather than having to create a new one.

Advertisement: