User login

WSF2008

What's updating Drupal's cache all the time on this crazy i18n, og, custom site?

Step by step to finding what's wrong.

So after catching a few of the other caches (views, locale) that were running too much for different reasons, we still have a MySQL frenzy on our hands.

The query I see over and over again in Agaric's logs on the WSF2008 site is "INSERT INTO cache (cid, data, created, expire, headers) VALUES ('locale:pt-br', 'a:3757:{s:2\"MB\".....

And "UPDATE cache SET data = 'a:4334:{s:2\"MB\"

By the way, in vi to go to the previous occurrence of a search, to search backwards, it's capital N (shift+N) instead of just n.

JavaScript and Google Maps: notes on resources

The APress book on google maps and AJAX looks like the best reference.

"Hacking Google Maps and Google Earth" is out of date.

http://googlemapsapi.blogspot.com/2007/11/calling-all-phpmysql-developers-come.html

JavaScript Debugger 0.9.87 Homepage
by James Ross, Robert Ginda

Getting latitude and longitude for countries, provinces, or cities

Stolen from Dwees in this comment:

  $city = $node->location['city'];
  $province = $node->location['province'];
  $country = $node->location['country'];

  $address = str_replace(" ", "+", $city .",". $province .",". $country);
  $google_key = variable_get('googlemap_api_key', '');

Scaling WSF2008

I still think the first thing to try is Boost is the first step to take.

I think it will cache the javascript needed to call and run the maps. And Language switching is done via the URL so that will work with a static HTML-ized site for anonymous users.

However, here's a recent approach to phased scaling with Drupal that makes a good start for WSF. We should stop short of database replication I think.

Yahoo Geocoding - doesn't provide lat-lon for country

Can't use Yahoo. No way to ask for the country (it replies with the country, but you can't ask for it) so no way to get lat-lon for country.

Woulda been cool though.

http://developer.yahoo.com/maps/rest/V1/geocode.html

http://jeremy.zawodny.com/blog/archives/005626.html

Agaric moves on...

Resolution

Removing the view tab from embedded profiles on user pages

Solution:

How to remove view/edit tabs?

http://drupal.org/node/83090

nodeprofile remove embedded view and edit links from profile
http://api.drupal.org/api/function/theme_menu_local_tasks/5

Note the approach:

Do not allow users to post content to organic groups except from within an organic group

Note that removing any content type you add this to from the "Create content" menu (Organic groups provides its own create content menu) is highly advised.

Furthermore we're going to restrict people (non-admins) to one and only one group at a time.

This approach allows Agaric to hack in whatever exceptions we want later (planned: allow posts for discussion spaces to post to post to multiple discussion spaces), without hacking organic groups (skip down to the resolution to see Agaric's solution).

IMPORTANT: Modified modules on WSF2008

The following modules have been modified from their original and we have to

Major impact on how site works:

Organic groups (just slightly to allow our form_alter subform nodeapi craziness, can beg for patch)

Minor (in terms of impact on the site if we screw up and fail to bring forward our changes on an update):

Nodeprofile (hid menu tabs, should supply patch)
Core (for l10n_client, this patch is part of Drupal 6)

Resolution

Agaric wants to turn sidebars on or off on a page by page basis in Drupal

Agaric Design Collective, every third site or so, really wants to be able to just tell a page: you see that sidebar? Don't display it. We don't care if we put blocks in it. We don't care if

Theming google map popups to use imagecache with Views and GMap module in Drupal

So you can pass in the imagecache presets namespace directly into your GMap view for use in pop-ups.

I had (apparently) figured this out a while ago but had Dan going through the code print_r'ing views variables to try to figure out where we could intercept the file ID and change the path to imagecache... and the path was already imagecache.

Any imagecache type you create can be chosen for CCK image

Moral of the story, when you're dealing with Views, assume it can be done through the user interface. There is full and amazing Imagecache support of Views.

Syndicate content