I imported a dump of the database to my local computer and have
figured out where user information is stored. In case your curious, it
looks like everything we need for population of the array in
truefan_badge.php is here:
> select uid,name from users;
We can include the role (I think that corresponds to the donation
level.) like so:
> select users_roles.uid,name,rid from users inner join users_roles on users.uid=users_roles.uid;
My next step is to call this within Drupal, potentially using the
Drupal 7's object-oriented database API.
thanks for the update. Yes, we will need to get the Ids and Names but
only of the Drupal users with the role "True Fan". You have the
database, when you have a working example, can you share it?
Best would be to implement it in:
Short update on the other work:
- Edu is working still on the Share and Invited Page
Nick, what happened with the Recognition Page?
Open Source Ecology Supporter
In doing this, I came to think that the DRUPAL_ROOT setting is
incorrectly configured. Maybe someone could look into that?
You can see it working here
I only changed one number in mywebsite.php; did you intend for me to do more?
And I actually didn't change mywebsite.php at all.
the code looks good.
1) Can we show the first and last name of the person (including the
checks if some of it is missing)?
2) When you are ready with the role, can you make it in such a way, that:
- When an Id is requested which is not of a True Fan, then an HTML is
returned with the text "Become a True Fan" linking to
http://opensourceecology.org/join.php (later we can adjust the HTML).
3) When everything is ready, can you optimize the performance of the
a PHP script (cron job runned every 1-2 minutes)? And then mywebsite.php
will read the data from the CSV.
Thank you for the progress!
2) The selection by roles is ready.
3) I never saw the point of putting this all in a client-side script
layer, and I think it'll be easier and faster not to use one. So,
needed. You can compare the methods here.
On Fri, Sep 2, 2011 at 4:16 PM, Nikolay Georgiev
On 09/02/2011 10:47 PM, Thomas Levine wrote:
> 1) I don't remember seeing the last name anywhere in the database. I
> guess I'm using the username rather than the firstname and lastname.
> I'll look for those later.
> 2) The selection by roles is ready.
> 3) I never saw the point of putting this all in a client-side script
> layer, and I think it'll be easier and faster not to use one. So,
> needed. You can compare the methods here.
a) changing the html on the server side structure will not change the
client code! (The user does not have to take care of changes, our server
than if it comes as a plain text. (a bit more secure)
Vimeo and Youtube use even iframe, which are maybe more secure than
Are the reasons understandable?
<div id="badge"></div> <script src="badge.js"></script> <script>ose_badge(3);</script>
Joe: It's actually way simpler than that right now, and my current
approach might not scale well. (I'm not doing much more than I'm told
to because I'm not really clear about what we're looking for.)
On security: I'm still puzzled as to what the security issue beyond
the ability to fake a badge. Maybe I don't know enough about what is
going into the badges.
If there are mockups or plans for the badges, could someone add them
to the wiki page?
We'd have to generate badge.js dynamically (we can cache it of
course). My approach allows us to put badge.js on a cdn.
I just realized that you had wanted me to write a php script that
script that would generate the html from a csv. Oops.
I also figured out that the CiviCRM stuff is in a different database
from the drupal stuff, which is why I couldn't find the first and last
names. My inclination modify my bash script accordingly, but I should
do all of this in PHP with the CiviCRM API. (In case you're confused
as to how it took me so long to realize this: I haven't used CiviCRM