[Imc-drupal-dev] newswire problems
bruno at indymedia.be
bruno at indymedia.be
Sat Oct 8 10:44:15 PDT 2005
hi John,
- for the blog node type, you should try to use "blog" (I think I came
across that at some point)
- just create a new block (Administer > Blocks > Add block) and paste
the code in the new block (make sure to check 'PHP code')
it's "dankjewel" :) you're welcome..
best,
-- bruno
John Axiak wrote:
> Hi Bruno,
>
> unfortunatly I ran into some problems.
>
> 1. If I use it on the blog (a module which comes with drupal, not with
> the flexinode module), I didn't find the correct lable for the variable
> $node_type=
>
> 2. I didn't find the place where to paste the code.
>
> danke vell (I don't think this is correctly spelled :) )
> John
>
>
> bruno at indymedia.be wrote:
>
>> hello,
>>
>> here's the code we use to display the latest 25 posts of the
>> flexinode-1 node type. it doesn't have a restriction what taxonomy is
>> concerned, instead it shows posts from all categories. copy/paste the
>> code in a block, using php code for the input format.
>>
>> <?php
>>
>> $node_type = "flexinode-1"; /* change this to the node type you want
>> to display */
>> $list_no =25;
>> $sql = "SELECT node.title, node.type, node.nid FROM node WHERE
>> node.type = '$node_type' LIMIT $list_no";
>> $result = db_query($sql);
>> while ($anode = db_fetch_object($result)) {
>> $output .= "<p>".l($anode->title, "node/$anode->nid")."</p>";
>> }
>> return $output;
>>
>> ?>
>>
>> to restrict the results to a certain category, you could try to add
>>
>> $taxo_id = x;
>>
>> where x is the number of the taxonomy term, under the node-type line..
>>
>> our test site is at http://indymedia2.all2all.org/drupal . still tons
>> of problems to work out, but learning slowly :)
>>
>> best,
>> -- bruno
>>
>> Cameron Gregg wrote:
>>
>>> John Axiak wrote:
>>>
>>>> hi everyone,
>>>>
>>>> I have "setup" newswire on a drupal cms (www.imcmalta.org). to do
>>>> this I used Flexinode. Got the idea from colombus imc.
>>>
>>>
>>>
>>> Could you fill us in on how the flexidnode helps make a newswire?
>>> How did you use it?
>>>
>>>> Unforunatly I am not managing to make a block which contains the
>>>> latest posts on the newswire. any ideas anyone?
>>>>
>>>
>>> firstly, I have forced every story into a 'newsire' catagory
>>>
>>> I originally used the taxonomy_block module:
>>> http://drupal.org/node/15192
>>>
>>> We found it didn't apply theme very well so we made a custom module
>>> that grabs the last 10 stories in the 'newswire' catagory, and
>>> displays them appropriately. You can have a copy if you want.
>>>
>>> dev site: http://9tails.cat.org.au/
>>>
>>> Cameron
>>> Syndey Indymedia
>>> _______________________________________________
>>> Imc-drupal-dev mailing list
>>> Imc-drupal-dev at lists.indymedia.org
>>> http://lists.indymedia.org/mailman/listinfo/imc-drupal-dev
>>>
>>>
>>
>> --
>>
>> "(...) people who are concerned about human rights issues, issues of
>> social justice, the environment, need to understand that unless you
>> change the media you never really ultimately are going to change
>> anything." -- Robert McChesney
>>
>> indymedia.be <http://belgium.indymedia.org> _ GetBasic
>> <http://getbasic.be> _ fluxx.be <http://fluxx.be>
>>
>> PGP public key: keys.indymedia.org <http://keys.indymedia.org> _ id:
>> D48B28E2
>>
>> --
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Imc-drupal-dev mailing list
>> Imc-drupal-dev at lists.indymedia.org
>> http://lists.indymedia.org/mailman/listinfo/imc-drupal-dev
>>
>>
>
>
>
--
"(...) people who are concerned about human rights issues, issues of
social justice, the environment, need to understand that unless you
change the media you never really ultimately are going to change
anything." -- Robert McChesney
indymedia.be <http://belgium.indymedia.org> _ GetBasic
<http://getbasic.be> _ fluxx.be <http://fluxx.be>
PGP public key: keys.indymedia.org <http://keys.indymedia.org> _ id:
D48B28E2
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.indymedia.org/pipermail/imc-drupal-dev/attachments/20051008/58721cbb/attachment-0001.html
More information about the Imc-drupal-dev
mailing list