This forum is for less technical discussions about the Drupal project, not for support questions.

Personal Photo Galleries - Block Available

Hi!
After reading the handbook chapter on Blocks (http://drupal.org/node/17170) and specially this topic about "showing the highest contributers to a site" (http://drupal.org/node/15638), I managed to make this block to show the 10 Personal Image Galleries which have images uploaded most recently:

$users = db_query("SELECT  COUNT({image}.nid) AS count, {users}.uid, {users}.name FROM {image} INNER JOIN {node} ON {image}.nid = {node}.nid INNER JOIN {users} ON {node}.uid = {users}.uid WHERE {node}.uid != 0 GROUP BY {users}.uid ORDER BY {node}.created DESC LIMIT 10");
print "<div class=\"item-list\"><ul>";
while ($user = db_fetch_object($users)) {
    print "<li>".l($user->name,"image/uid/$user->uid")." ($user->count)</li>";
}
print "</ul></div>";

All you have to do is add a block, set 'input format' to PHP code and paste the code above. Then enable the block.

If you want more than 10 galleries, change 'DESC LIMIT 10' to the desired number.

If your users have personal and non-personal images/photos, you might want to change the where clause to:

'WHERE nyc_node.uid != 0 and nyc_image.personal = 1'

so that only the images assigned as "personal" will be counted.

In my case, I used this patch "show personal images in shared galleries" (http://drupal.org/node/11392) and changed the sql a little bit so that when you see the personal gallery of an user, you see all the images they uploaded.

I hope it's useful. :-)

Creating Extra Pages w/ Static Content

I'm trying to create extra pages (faqs and an about pages, for example) with static content. I've looked through the available documentation, and I've had another developer look into it. Neither of us can figure it out. You can see what I mean at www.Grahn400.com/drupal/ (the link on the top right); this is the last last change I need to finish before launching.

Link to info about Drupal 4.6?

Anyone have a link to what's coming in the next iteration of Drupal? I searched but couldn't find anything.

Image.module - gallery problem

Hey to all. I have installed image.module in good order. Temp path, vocabulary,.., all is "ok". But when i upload image to vocabulary i wrote, and i click on "my image gallery" i see only title "Essedariuss image gallery" but i dont see any images. There are succesfully uploaded and published. How i do that, or how can i upload images to my gallery? Thx comrades

Drupal and the "hidden Web"

I'm used to running static Web sites, where robots quickly crawl over new content, allowing changes and additions to show up on public search engines. Presumably the situation is very different with dynamic sites, like those generated by Drupal. Is there a need to maintain a static index of the site contents if you want everything on your site to be accessible in, for example, a Google search? If so, should there be a module that generates indices of this sort? Or are Google's robots clever enough to construct queries that can cycle through the various nodes in a Drupal site?

Search patch for 4.5.1 now getting errors with cron

I just applied the patch I found for the Search improvements - now nothing is getting indexed (thus no search results) and I am getting this when I run cron.php from my browser.

user error: Table 'politic_drpl1.search_total' doesn't exist
query: SELECT t.word AS realword, i.word FROM search_total t LEFT JOIN search_index i ON t.word = i.word WHERE i.word IS NULL in /home/politic/public_html/includes/database.mysql.inc on line 125.

Pages

Subscribe with RSS Subscribe to RSS - General discussion