CVS edit link for Ivan Simonov

I successfully use Drupal for a long time and I would like to make contribution to the community.
Some time I wrote "randomimage" module for Drupal 5. Then I adapt it for Drupal 6.
I use this module on my site to show faces of our employees and their names and titles in block.
Friends ask me about this module and I decide rewrite it and publish.
I change conception of this module to use more standard Drupal functions.
For example "randomimage" depends of "upload" module for uploading pictures.
I recommend to install also http://drupal.org/project/upload_preview module.
Module adds 1 block, 1 page and 1 permission (viewing this page).
If you need more blocks (and pages), you can add them from the administrative interface of 1st block.
Also you can select node with uploaded images to be shown in the block.
If permissions is set users can click to block image and go to the page represents all pictures shown in this block.
In my case it useful when I want to show all staff photos with names and titles. They sorted randomly.

I know about http://drupal.org/project/random_images module
But It has not needed functionality.
This module exist only for Drupal 5 and not updated since 2007-Nov-28.

It is possible to use my module like next version of "random_images" module. Why not? :)

Actually it was start from PHP snippet:

  // Depends on upload module
  $nid= 2;  // Node ID with pictures uploaded
  $width = 200;  // Desirable picture width
  global $base_path;
  $node = node_load($nid);
  if (count($node->files)>0):
    $index = array_rand ($node->files);
    $filename = ($node->files[$index]->filename);
    $filepath = ($base_path . $node->files[$index]->filepath);
    $description = ($node->files[$index]->description);
    print "<center>";
    print "<img src='$filepath' width ='$width' alt='$filename'><br>";
    print filter_xss($description, $allowed_tags = array('a', 'em', 'strong', 'cite', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'img', 'br', 'hr' ));
    print "</center>";
  endif;

And something like this for page with all uploaded images.
Snippet good for some people, but to manage it you must have at least Use PHP filter permission.
To increase flexibility and automatize it I decide to make this module and share it.

I have another one module which uses actions mechanism and send to desired account alerts via Jabber protocol.
But I am not ready yet to send it.

Have a nice day,
Ivan.

CommentFileSizeAuthor
#1 randomimage.zip2.77 KBIvan Simonov

Comments

Ivan Simonov’s picture

StatusFileSize
new2.77 KB

Module attached.

Ivan Simonov’s picture

Status: Postponed (maintainer needs more info) » Needs review
avpaderno’s picture

Issue tags: +Module review

Are there any reasons you didn't open a feature request for all the features not existing in Random Images, or you didn't offer to become a co-maintainer of the existing module?

Ivan Simonov’s picture

I just look on the Random Images Issues Page
http://drupal.org/project/issues/random_images?categories=All
and decide this project is abandoned.
Last feature request was open 7 month ago and have no answer.
This request about version for Drupal 6.x

Advise me next steps please.
What better to do now? :)

avpaderno’s picture

The fact a project seems abandoned is not a reason to create a different project with the same purpose, or with very similar purpose.
You should offer to become co-maintainer of the project already in Drupal.org CVS.

Ivan Simonov’s picture

OK. You right.
I am agree to become co-maintainer.
Where I have to offer it?
Here or in random_images thread?

avpaderno’s picture

Where I have to offer it?

The support request to offer to become co-maintainer must be opened in the project issue queue.

Ivan Simonov’s picture

Ivan Simonov’s picture

Unfortunately no answer from current maintainer.
Any suggestions?

avpaderno’s picture

Status: Needs review » Fixed

The current maintainer replied. I am going to add you as co-maintainer of Random Images.

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

apaderno credited criznach.

avpaderno’s picture

Component: Miscellaneous » co-maintainer application
Assigned: Unassigned » avpaderno
Issue summary: View changes