1

Topic: How to create a page that displays "it is their birthday"

How to create a page that displays "it is their birthday"
With Section Women and Men
See here

Thank you

2

Re: How to create a page that displays "it is their birthday"

yes, how to? let us know :-)

3

Re: How to create a page that displays "it is their birthday"

Yes, How do you do that ?? please ??? Thx.

4

Re: How to create a page that displays "it is their birthday"

Bump +1

5

Re: How to create a page that displays "it is their birthday"

I just do not know,
this is not my site so I am asking
How can I make this feature
Thank you

6

Re: How to create a page that displays "it is their birthday"

I think vlad will answer this question ?

7

Re: How to create a page that displays "it is their birthday"

Ask the person who owns the site you refer to, but to be honest, I don't see any great difficulty in doing this, although it is definitely a little bit of custom coding/SQL.

eg. A cron script that runs at midnight can find out who has a birthday, and add those people to a table, created for the purpose of holding member birthdays. There is half of the solution.
The second half requires displaying the contents of a table, and that is done everywhere in the script, which can give a person a clue on how to do it.
php can also be added to the display output.  Doing this is frowned upon by some, as it defeats the template design purpose of separating code from display, but it can still be done, and is a possible solution that springs to mind.

Having said that though, I realize that people's experience levels are different, and although I don't think it requires too much, it could still be too much for some. Unfortunately my own to-do list is too long, but there are others around who should be able to do this as well.

I would ask the owner of the referenced site as a first start, to try and avoid re-inventing what's already been done.

8

Re: How to create a page that displays "it is their birthday"

I may be wrong, but I believe this mod is already on vldCrowd. You may want to research it there.

9

Re: How to create a page that displays "it is their birthday"

think its easier to create with an extension

10

Re: How to create a page that displays "it is their birthday"

display members birthday

Give the world the best you have, and the best will come to you.
Tutorials and Mods for VldPersonals   Swedish Dating on Love2u.se   VldCrowd:s Community

11

Re: How to create a page that displays "it is their birthday"

Kudos to the radio-man for his extension of the member extension, but indeed, I think I prefer my original start, which would be followed by a tiny extension.

Why?

Because the members extension has to build, and then perform, a relatively complex query

$result = $DB->query("SELECT m.*, if(m.totalvotes,m.totalscore/m.totalvotes,0) as ratings
 FROM " . DB_PREFIX . "members AS m ".($visitors_id ? ", " . DB_PREFIX . "visitors AS v" : "")."
WHERE m.active='1' AND m.group_id NOT IN (".$PREFS->conf['pending_member_group'].",".$PREFS->conf['canceled_member_group'].")
".($visitors_id ? "AND v.member_id=$visitors_id AND v.visitor_id=m.member_id" : "")." $wheresql
ORDER BY $orderby $orderdir LIMIT $limit");

and then iterate through the member result set that gets returned

if ($DB->num_rows($result))
    {
    while($obj = $DB->fetch_array($result, MYSQL_ASSOC))
        {
            $results[$obj['member_id']] = $SESSION->parse_data($obj, array());
            $profile_types[$obj['type_id']][] = $obj['member_id'];
        }
    }

and then get the profile information

$SESSION->fetch_profiles($results, $profile_types, array('loader' => 'in_browse'));

All of this before putting it into the cache, every time the member's extension gets called.
There will be times, of course, when it gets pulled from the cache, and that's fantastically brilliant, but look at all those server loads whenever the query has to be updated as the cache expires.

compared to

At midnight a CRON script runs and does everything above - the complex query, iterating through the result set, then get the profile information, but, and the important but, is that the resulting data is put into a table called, perhaps, vld_todaysbdays.

Then, all a new extension has to do, is check the cache .. so far no change to other routine.

But what if it's not in the cache?

The extension doesn't have to do all those queries and calculations again...

A simple SELECT * FROM vld_todaysbdays; to get the answers, M+F
SELECT * where gender = 'f'; to get just female members

Smaller, quicker, and much less server load.

12

Re: How to create a page that displays "it is their birthday"

and how should we do ?
someone can be kind and explain ?

Give the world the best you have, and the best will come to you.
Tutorials and Mods for VldPersonals   Swedish Dating on Love2u.se   VldCrowd:s Community

13

Re: How to create a page that displays "it is their birthday"

I used Ramil's birthday mod on vldCrowd and it works great. No problems.

You can see it on my homepage here: http://www.filipinaeyes.com/online-dating-gallery/

14

Re: How to create a page that displays "it is their birthday"

Thank you but on the anniversary page on my site it does not display the "footer"
Yet I respected throughout the tutorial.
Can you tell me why I do not see the footer at the bottom of the page?
You can also see the error of the footer on my site HERE

Last edited by pierrehs (2011-12-11 07:20:56)

15

Re: How to create a page that displays "it is their birthday"

This mod did not work on  V2.7
I did anothers.
+1