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

Block for comments approval queue, how to show only when not emty?

I'm trying to make a adminblock.module and the first part is to show the comments approval queue. I have it working but I would like the block to show only when there are comments to approve.

The && $items != "" in adminblock_block() is not working. Any tips or hints?

As you no doubt can tell I'm not a PHP programmer.

[?php

// adminblock.module v0.1.0, Fredrik Jonsson, 2004-07-15
// (Based on latest.module v0.1.0, John Clift, 11 Dec 2003)

function adminblock_help($section = "admin/help#adminblock") {
$output = "";

switch ($section) {
case 'admin/system/modules#description':
$output = t("Block that display the comments approval queue.");
break;
}
return $output;
}

// Database query to get the comments approval queue
// $nlimit sets the number of comments titles to display

function adminblock_content() {
$nlimit = 10;
$result = db_query_range("SELECT c.timestamp, c.subject, c.cid, c.status
FROM comments c
WHERE c.status = 1
ORDER BY c.timestamp
DESC ", 0, $nlimit);
while ($comment = db_fetch_object($result)) {
$items[] = check_output($comment->subject)." "." - ".format_date($comment->timestamp, "medium")." [".l(t("edit"),"admin/comment/edit/".$comment->cid)."]|[".l(t("delete"),"admin/comment/delete/".$comment->cid)."]";
}
$output = theme("item_list", $items);

for sale module how do i do it? (please help :( )

I'm a noobie when it comes to doing drupal i've been doing php for a while but drupal is something else alltogether.
But i want to know this:
How would i write a module that allowed people to sell stuff on my site?
it does not need to have any crdit card facilities on it because it's more to tell people that it is for sale than for people to acutally buy stuff online. Sort of like the freeads website.

The user needs to be able to upload an image of what they have to sell and also how much it would cost.

FunGames (over150) and Funvideos

Hi!

I have tested half the Night my Funvideos and Fungames Modules. (Drupal v4.4.2)
I am new to Drupal and it was tricky to include the content.
Problem:
Always when i read the dynamic content from my Server it kills my DrupalSite.

The only Solution was, to include the Modules via InlineFrame. Looks bad - but works.
They can be uploaded and activatet.
(I will spend more time to fit it in the themes.)
But so long... Have Fun with this content.

It is free and hosted external. That means you have no Traffic and are topical.

Custom Node Pages, where all that is shown is the desired HTML/PHP whithin the Drupal framework?

Does something like this exist?

I'm searching for a way to allow for content to appear as the HTML coder wants, with no added taxonomy/posted by/titles/etc.. So that the only thing to appear inside the framework of the drupal site, is the custom html or php that was entered, plus an administer link.

I'm not sure exactly how this is done, but i think have some clue, maybe someone can point me in the correct direction.

Event management based on flexinode module

I would like to use flexinode to store events. this because, based on the type of event, I would need to store different data.
for some kind of events, I would need a start and end date, while for others, only start date could be fine.
I'm trying to face how to filter based on start and end date and to present data ordered by start date.
Actually, I have different modules to manage the different types of events, but this approach is difficult to manage and very heavy, because Drupal has to load all modules, and this results in high memory needs.

new module - "mypage" - seeking thoughts

I've created a module (my first) that I have started using called "mypage". Every user can select the taxonomy terms he/she reads, and then they are combined into one page which can be accessed at "?q=mypage/view". This lets you provide users with a "personal" page.

Under the covers, all the module does is create a "taxonomy/view/or/1,3,7,16" page. However, the user's subscriptions are saved in the database and therefore get persisted.

Additionally, the simpler URL makes sense to unsophisticated users who don't know anything about taxonomies.

There are two pages total... "build my page" and "view my page". The "build" page displays all taxonomies and terms in a tree, with a checkbox next to each. The user simply checks the ones he/she wants and the selections get saved. The "view" page looks up the chosen terms and creates a customized page.

The module also allows customized RSS feeds. Since feeds are requested by users who aren't logged in, getting a feed requires a username in the URL: "?q=mypage/feed/jsmith"

It seems this would work best for intranet sites or sites with mostly internal users. A marketing employee in Los Angeles wants to see nodes related to marketing and Los Angeles, but does not want to see all the nodes directed to the finance department, or the Chicago sales staff. This person may also want to receive info about the company's softball team but not its wine-tasting club. This module makes that type of filtering very easy.

Pages

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