Jeff VIP
Total posts: 745
15 Апр 2014 00:22

Hi,

I have a database of people (not registered users btw) and I would like to list their birthdays in a module like: Born today, or Born this week, or Born this month. Perhaps the module records can be altered to include such functionality? Hope you can help me with this.

Best regards, Jeff

Последние изменения: 01 Июнь 2016


Jeff VIP
Total posts: 745
24 Окт 2014 00:09

If I set Who can see expired articles to NO in the type settings, people can't prolong expired records by a button in the main record list anymore. So I can't touch that.

I only want to show active/prolonged records in my custom module because it is to promote paid prolongations of records only.

So

Main list: show expired records - YES

List in custom module: show expired records - NO


pepperstreet VIP
Total posts: 3,837
24 Окт 2014 00:32

Jeff List in custom module: show expired records - NO

Have mercy, I could be totally wrong here... cause I have not worked with Cobalt API, just read the docs and followed the news etc.

AFAIK, there is an API parameter for "view_what", right? I think, this has been extended with more options than in the current docs article. See the latest Records module and XML file for "view what" parameter.

               <field name="view_what" type="list" default="" label="What to show">
                    <option value="all">Any article</option>
                    <option value="exclude_featured">Excluding featured</option>
                    <option value="only_featured">Only featured</option>
                    <option value="only_expired">Only expired</option>
                    <option value="only_future">Only future</option>
                </field>

So, you might pass the respective parameter and get the proper results. (If this is all nonsense, don't beat me ;) )


Jeff VIP
Total posts: 745
24 Окт 2014 00:44

pepperstreet Have mercy, I could be totally wrong here... cause I have not worked with Cobalt API, just read the docs and followed the news etc.

Ha, thanks for the pointer pepperstreet, but I need to exclude expired records from the list.


pepperstreet VIP
Total posts: 3,837
24 Окт 2014 01:17

What about only future? Wouldn't it have the same effect/results?

Or do you show and list birthdays from the past, too?


Jeff VIP
Total posts: 745
24 Окт 2014 01:40

pepperstreet Or do you show and list birthdays from the past, too?

Yes

Actually it is an anniversary module, so dates from the past must be included.


pepperstreet VIP
Total posts: 3,837
24 Окт 2014 02:11

Jeff but I need to exclude expired records from the list.

Bummer... Than the magnificent @Sergey have to extend the API and Records Module with exclude expired ! ;)


Jeff VIP
Total posts: 745
24 Окт 2014 02:13

pepperstreet Bummer... Than the magnificent @Sergey have to extend the API and Records Module with exclude expired ! ;)

+1


Jeff VIP
Total posts: 745
26 Окт 2014 23:05

I can happily confirm that the warnings

Warning: strpos() expects parameter 1 to be string, array given in /home/mysite/public_html/sandbox/libraries/joomla/language/text.php on line 72

Warning: strtoupper() expects parameter 1 to be string, array given in /home/mysite/public_html/sandbox/libraries/joomla/language/language.php on line 328

have disappeared after updating Cobalt to version 8.595

Thanks for addressing this issue!


Giorgi625 VIP
Total posts: 655
14 Янв 2016 08:21

So I have read this topic and how I guess I can create module like in image using information from this topic. Am I right? I use date and time field for displaying birthdays. http://i.imgur.com/HqHRkAp.jpg


Sergey
Total posts: 13,748
15 Янв 2016 10:34

Giorgi625 So I have read this topic and how I guess I can create module like in image using information from this topic. Am I right? I use date and time field for displaying birthdays. http://i.imgur.com/HqHRkAp.jpg

Right.

Работает на Cobalt