Active
Project:
Last Node
Version:
6.x-2.3
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2008 at 04:26 UTC
Updated:
29 May 2010 at 11:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
TheCrow commentedThe most simple way is to add this code in the _last_node_contents function:
In the example the node type is story:
Comment #2
fabrizioprocopio commentedEN:
Thanks a lot,
the problem is that I don't know php.
Can you explain particularly where put the code you posted?
-------------------------------------------
IT:
Ti ringrazio, il problema è che io non conosco il php,
potresti spiegarmi un po' più banalmente dove copiare e incollare il codice che hai postato?
ti ringrazio molto
fabrizio
Comment #3
TheCrow commentednel file last_node.module, dovresti trovare quella funzione descritta, se ti può servire una guida di base alla creazione di moduli dove specifico la parte relativa ai blocchi. :))
Comment #4
fabrizioprocopio commentedGrazie davvero!
fabrizio :-)
Comment #5
amalrajsj commentedDear Crow,
I happened to see your comments about the marquee function. Could you be kind enough to tell me about how to use the function in my home page alone? I do not want the node to be displayed. Just some text, which is often changed, should be displayed in the home page. I am using drupal 6.9 version for my site. If there are some modules to perform this function please let me know. I want a simple marquee function with a facility to upload the text context. I would be grateful to your contribution.
Thanking you in advance,
AAR
Comment #6
TheCrow commentedthis block is the basic for display the last 10 titles belonging to story type without need any other module:
i leaved the code for add the css and format the text for keep it clear... using front page module you can paste and adjust it for have your personal home page... otherwise you can paste it inside a block and show it in the region you want (depend from the theme). Just remember to enable the PHP filter.
If you need more simply snippets watch too here.
For more complex and generic use Views module represent the big approach for make any kind of SQL query at your database... it's not so easy to use if you start just now with Drupal but is very powerfull and much documented... could be the answer to your question!
Comment #7
WiFier commentedThank you, sounds good..
but I couldn't make it work on my drupal it returns the same code in the blok.
Could any one please help making it work?
Comment #8
TheCrow commentedwhat code you referrer? #6 or #1?
The #1 is just a part for expand last_node module but it's not complete... need integrate with the tutorial hint for show the new block into the 'admin block' page...
#6 is a stand alone code... doesn't need any other module, just past it into a block u create from zero and modify it for your needs... don't forget to do a preview before save it...
Comment #9
Appelflapje33 commentedWhen I paste the PHP code (from post #6) in a block i get the following error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''nieuws' AND n.status = 1 ORDER BY n.created DESC LIMIT 0, 10' at line 1 query: SELECT n.nid, n.title FROM node n WHERE n.type in 'nieuws' AND n.status = 1 ORDER BY n.created DESC LIMIT 0, 10 in ***/includes/common.inc(1685) : eval()'d code on line 4.
HELP?
Comment #10
sudan commentedactually i want to add news headlines in my website. i need it to be scrolling in my page.i know hoe to make it scroll but i want to know how to add automatically updated news in side the bar which contains the scrolling text...
this is an example. i'm attaching a page to this mail.. in this u can see a dark red color bar with news running in it. it was just copied from a site.. i need it the similar way but the thing is that the news headlines should be automatically updated every day and also time to time... please help me out ...the file attached is a text file . just save it as a html file and open it..