This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Customizing an Index, Customizing Categories

Hi, I have a lot of questions but I will try to stick to the big ones. We're working on a multiuser site. Some of the writers will be paid, some will sign up for free and post their own material.

We need users to sign up and pick one of six categories they would like to be placed under for the index listing. We need the paid writers to appear at the top of the index for each of the six categories so I assume there is a way to weight them much like we do terms in the taxonomy or the menus. Any idea what that is? Do I make a table entry just for them?

Flash Games module

I am in the process of writing a Drupal Flash Games module which will support games from www.pnflashgames.com. To install a new game on your web site, you need to download and extract a game from the www.pnflashgames.com web site then upload it to a folder on the web server (I use files/games). From there, you create content a flash game and specify related game information, i.e., name, description, game file, author, height, width, background color, etc. If the game uploaded is scoring enabled, high scores for each user will be saved, and on the game's node the top 20 scores will be displayed.

My proof-of-concept works, albeit with a tweak to menu.inc. However, the module needs much more. Even though I am a software developer of 16 years, I am a novice at PHP and more like infancy-level at Drupal module developement. I am sure there are things I am doing wrong in regards to best practices in Drupal module development.

I could really use the help of some seasoned Drupal module developers to get this module complete so that the community can benefit from it. Before Drupal, I ran numerous Postnuke web sites with a similar module and you would be surprised how much traffic that simple module generated.

Things that need to be done:

  • Add Top Players block
  • Add Latest Top Scores block
  • View games by categories (not completely up on Drupal taxonomy yet)

multiple database

I created a database named bilsavt and in the settings.php as instructed at http://drupal.org/node/18429, when i try to connect to other db from a page with full php.

user warning: Table 'bilsa.bilsa' doesn't exist query: SELECT * FROM bilsa in /var/www/drupal/includes/database.mysql.inc on line 120.

settings.php:

customise forum.module help required...

Hi & Happy New Year.

I'm a drupal newbie and trying to tweak the forum on my site: http://guernseykayaking.com/forum
I've fiddled with the css to change the colours, but now i'd really like to have it so that in the last post column, it displays the title of the last post as well as just the date and user.

I've seen this on other drupal sites and searched extensively for a solution but have been unable to find anything!

workflow that clones a document in a non-editable state, then updates original with modified clone

The modules:
CCK
workflow
workflow_access
actions
node clone

The problem:
I have a workflow for a CCK node type that includes a "Live" state. When a node is "live," it cannot be edited (I've configured it thus with workflow_access). I want to permit my users to apply updates to these documents in the following steps:

  1. When the user wants to submit updates for a live document, a copy of the node is created. The user becomes the author of the new node as usual, but the node "remembers" the nid of the original in a hidden field.
  2. The user applies her updates to the document and submits it for review (which my current workflow does).
  3. When an admin makes the clone live--this is the tricky part--it automatically overwrites the original. The live node retains the nid, path, and taxonomy as the original, but the title and content fields are replaced by those of the submitted clone, and the revision and workflow history of the clone are appended to the original's.

Somehow, the copy needs to "remember" the parent's node id, and somehow, it needs to trigger the special update process when it goes live. Any advice on how to proceed? I'm an experienced PHP coder, but the Drupal API is foreign country. I want to develop this functionality the "right" way, so that it's not going to break everything the next time I n

Defining a page owner

I need to create a sidebar with various user information for the owner of each page.

For example, if I am viewing a poll, guestbook, blog entry or whatever owned by a specific person, the sidebar would contain information about that person with links to various relevant content.

This is turning out to be much harder than I expected and I wonder if I am missing something.

I am using the phptemplate engine. My first plan was to create a variable called "$page_owner" from $node->uid in _phptemplate_variables in templates.php.

However, I soon discovered that $node is often not available in this function. Apparently it is only provided if the URL is of the form /node/$uid, which it often is not. Eg blogs. Moreover, some objects like guestbooks have owners but are not created as nodes in the guestbook module. In other cases, comments on an object are not nodes, etc.

So my next plan was to create a global variable called $page_owner and define appropriately it in various modules.

However, it appears that no global variables I define in my modules are visible to template.php. The values are always blank no matter where I define them - eg. hook_menu defines a title field that the theme system can use, but no global variables set there can be accessed from template.php .

I have never seen this kind of behaviour in other PHP applications I have coded - it appears that Drupal is wiping out my global variables in the middle of the page creation process.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions