Zufälliger Artikel

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
FastPhive
Posts: 19
Joined: Thu 19. Aug 2004, 11:55
Location: Chemnitz
Contact:

Zufälliger Artikel

Post by FastPhive »

Hallo zusammen,

ich bin am verzweifeln und bitte hier um eure Hilfe.

Ich hab folgendes vor:
Es soll ein Block in meiner Sidebar angezeigt werden, der Teile eines zufälligen Artikels aus einer bestimten Kategorie anzeigt.

Die anzuzeigenden Teile sind:
-Title
-Subtitle
-Image
-Summary
-Link zum vollen Artikel

Die SQL Query sieht dann also so aus:

Code: Select all

SELECT `article_id` , `article_cid` , `article_title` ,`article_public` , `article_subtitle` , `article_summary` ,`article_image`' . ' FROM `phpwcms_article` WHERE `article_cid`=22 AND `article_public` =1 AND `article_id` !=7 ORDER BY RAND( )  LIMIT 1;  
Jetz hab ich mir ein eigenes Script gebaut, was fast alles so macht, wie es soll. Aber eben leider nur fast...

Mein Script in Action: http://janvoigtmann.de/splash/scripts/r ... mepage.php

Problem ist:
1. Das Bild (wie komme ich an die URL des Bildes aus dem Blob-Feld der DB?)
2. Der Link zum vollen Artikel (Wie baue ich den String zum Artikel?)


Ich hab schon versucht mein Problem mit dem Teaser_Ex RT zu lösen, allerdings ist da leider kein "Random" möglich.

Wer kann mir helfen?
Post Reply