#1 (permalink)  
Old 11.03.2010, 08:38
vbdesigns Guru
 
Join Date: 03.2006
Posts: 528
Rep Power: 8
WeserInfo has a spectacular aura aboutWeserInfo has a spectacular aura about
Photopost Pro | vb-cms code
Hallo,

ich habe in einem Forum folgenden Code für die Widgets von VB gefunden.

PHP Code:
$host  'database_server'
$dbUser 'database_user';   
$dbPass 'database_password'
$db 'database_name'
mysql_connect("$host""$dbUser""$dbPass") or die(mysql_error());
mysql_select_db("$db") or die(mysql_error());

ob_start();

$result mysql_query("SELECT id,cat,bigimage FROM pp_photos order by rand() LIMIT 1" ) or die(mysql_error());   
while(
$row mysql_fetch_array$result )) {    
print 
"<div align=\"center\"><a href=\"photos/showphoto.php/photo/" $row['id'] . "\"><img src=\"photos/data/" $row['cat'] . "/thumbs/" .  $row['bigimage'] . "\"></a><br /><a href=\"/gallery\">See more photos in the Gallery</a></div>";
}

$output .= ob_get_contents();
ob_end_clean(); 
Kann man das in irgendeiner Forum für das VBCMS als Modul verwenden ? Ich würde gerne Random-Images auf der Portal-Seite anzeigen lassen.
Reply With Quote
  #2 (permalink)  
Old 11.03.2010, 09:22
Christian's Avatar
Web Design
 
Join Date: 12.2003
Location: In Spocks Quartier
Age: 34
Posts: 16,869
Rep Power: 10
Christian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond repute
Ja mit Dateiausgabe Puffern im Modul ist das kein Problem, das "ob_" Zeugs kannst dann weglassen.

Modul-Verwaltung - vBCMS
__________________
Meine kleinen Engel ... Die Rabauken ...
Reply With Quote
  #3 (permalink)  
Old 11.03.2010, 09:51
vbdesigns Guru
 
Join Date: 03.2006
Posts: 528
Rep Power: 8
WeserInfo has a spectacular aura aboutWeserInfo has a spectacular aura about
Also nehme ich folgenden Code.

Code:
$host  = 'database_server'; 
$dbUser = 'database_user';   
$dbPass = 'database_password'; 
$db = 'database_name'; 
mysql_connect("$host", "$dbUser", "$dbPass") or die(mysql_error());
mysql_select_db("$db") or die(mysql_error());


$result = mysql_query("SELECT id,cat,bigimage FROM pp_photos order by rand() LIMIT 1" ) or die(mysql_error());   
while($row = mysql_fetch_array( $result )) {    
print "<div align=\"center\"><a href=\"photos/showphoto.php/photo/" . $row['id'] . "\"><img src=\"photos/data/" . $row['cat'] . "/thumbs/" .  $row['bigimage'] . "\"></a><br /><a href=\"/gallery\">See more photos in the Gallery</a></div>";
}

$output .= ob_get_contents();

Noch ein Tipp zum zu verwendenden Template ? Kann ich da was existierendes nehmen. Soll ja im Prinzip standard Box mit 186px sein.
Reply With Quote
  #4 (permalink)  
Old 11.03.2010, 12:49
Neuer Benutzer
 
Join Date: 07.2009
Posts: 19
Rep Power: 3
icyderguru is on a distinguished road
vielleicht das rand() befehl im mysql statement vermeiden
Reply With Quote
  #5 (permalink)  
Old 11.03.2010, 12:51
vbdesigns Guru
 
Join Date: 03.2006
Posts: 528
Rep Power: 8
WeserInfo has a spectacular aura aboutWeserInfo has a spectacular aura about


Habe den Versuch erstmal eingestellt. Nachdem ich es mal vorschriftsmäßig nach Anleitung gemacht habe ( link in der Signatur von Christian ) kann hinterher nicht mehr als eine weiße Seite.

Ich glaube da bedarf es noch etwas mehr.
Reply With Quote
  #6 (permalink)  
Old 11.03.2010, 14:30
Christian's Avatar
Web Design
 
Join Date: 12.2003
Location: In Spocks Quartier
Age: 34
Posts: 16,869
Rep Power: 10
Christian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond repute
Code:
$output .= ob_get_contents();
Kann auch raus, nicht vergessen Dateiausgabe Puffern auf Ja setzen in den Moduleinstellungen.
__________________
Meine kleinen Engel ... Die Rabauken ...
Reply With Quote
  #7 (permalink)  
Old 11.03.2010, 15:25
vbdesigns Guru
 
Join Date: 03.2006
Posts: 528
Rep Power: 8
WeserInfo has a spectacular aura aboutWeserInfo has a spectacular aura about
Weiße Seite,

ich glaube das kann auch an den Templates liegen. Die habe ich einfach nur nach deinem Beispiel angelegt

Aber Du hast sicherlich wichtigeres zutun.
Reply With Quote
  #8 (permalink)  
Old 11.03.2010, 17:26
Christian's Avatar
Web Design
 
Join Date: 12.2003
Location: In Spocks Quartier
Age: 34
Posts: 16,869
Rep Power: 10
Christian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond reputeChristian has a reputation beyond repute
Ein Template ist für das Modul garnicht nötig. Da du den Output über PHP steuerst mit echo, print etc.
__________________
Meine kleinen Engel ... Die Rabauken ...
Reply With Quote
  #9 (permalink)  
Old 11.03.2010, 17:52
vbdesigns Guru
 
Join Date: 03.2006
Posts: 528
Rep Power: 8
WeserInfo has a spectacular aura aboutWeserInfo has a spectacular aura about
<?php
/*================================================= =======================*\
|| ################################################## #################### ||
|| # vBCMS Version 2.0.0 BETA 4 Licence Number: || # Downloaded: 13:06:09 7.04.2009
|| # ------------------------------------------------------------------ # ||
|| # Copyright © 2002 - 2009 Reuter & Bloeß GbR. ||
|| # ------------------- VBCMS IS NOT FREE SOFTWARE ------------------- # ||
|| # vBulletin Styles, phpBB Styles, wBB Styles, Web Templates, Web Design, vBCMS | Supportforum vbdesigns.de - Fehler 404 # ||
|| ################################################## #################### ||
\*================================================ ========================*/

/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded:
|| # SVN: $RCSfile$ - $Revision: 1259 $
|| ################################################## ##################
\*================================================ ======================*/
$host = 'xxx';
$dbUser = 'xxx';
$dbPass = 'xxxx';
$db = 'xxxx';
mysql_connect("$host", "$dbUser", "$dbPass") or die(mysql_error());
mysql_select_db("$db") or die(mysql_error());


$result = mysql_query("SELECT id,cat,bigimage FROM pp_photos order by rand() LIMIT 1" ) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
print "<div align=\"center\"><a href=\"photos/showphoto.php/photo/" . $row['id'] . "\"><img src=\"photos/data/" . $row['cat'] . "/thumbs/" . $row['bigimage'] . "\"></a><br /><a href=\"/gallery\">See more photos in the Gallery</a></div>";
}

?>


Bringt nach dem löschen der Templates immer noch ein weißes Bild.

ABER, ich habe mal einen Teil des Codes FETT abgebildet. Dieser Pfad ist mir nicht ganz geläufig.

Wenn es mal in einer ruhigeren Minute passt wäre es schön wenn wir das mal hinbekommen. Denn so wie ich gelesen habe läuft das Ding bei den Widgets auch nicht korrekt. Als Modul für VBCMS wäre das ja direkt ne Premiere für Photopost
Reply With Quote
Reply

Lesezeichen

Thread Tools
Display Modes

Posting Rules
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist On.
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Photopost integration Lordi vBCMS® Fragen 18 04.04.2008 03:35
vbcms & Photopost haenk vBCMS® Fragen 3 12.03.2008 09:03
harmonystyle + photopost taeb.de Style- & Web Template Support 18 19.02.2008 11:42
photopost matze_pipe Fragen vor dem Kauf 3 18.02.2008 13:24
cyberhype and photopost fleshy66 English customer support 3 01.10.2006 13:32


Copyright © 2006, Reuter & Bloeß GbR.
| Datenschutz | Sitemap | Unsere Partner | Top |
Home Products Forum Über uns Support & FAQs
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Tipp: Fussball | Heilerde
Shopsystem, Shop System, CMS, Webkatalog mit vBCMS CMS