[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Niet weergeven als categorie geen posts bezit.
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Niet weergeven als categorie geen posts bezit.

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

Niet weergeven als categorie geen posts bezit.

Berichtdoor Robin Huurman » 15 jan 2008 18:47

Hallo,

ik heb een vraag over PHP, ik ben nog niet zo heel lang bezig in deze wereld, en kom dus regelmatig tegen problemen aanlopen. Wel, nu heb ik een functie gemaakt met een SQL query erin. Die sql pakt gegevens uit een database, vergelijkbaar met de phpBB3.x (forum) voorpagina, d.m.v. een 'while'. Categoriën en posts staan in dezelfde tabel. Als er een categorie aangemaakt moet worden krijgt de rij een randje eromheen (net als bij phpBB3.x) binnen dat randje staan dan de posts. Bij elke post staat (in de database) wat zijn parent (categorie) is. Als het om een categorie gaat is de parent '0' en de post_type '0'. Nu mijn vraag, als er in de categorie geen posts staan, kan ik er dan voor zorgen dat de hele categorie weggelaten wordt?

Hier een screenshotje: (De categorie 'Films/Beeld' moet dus weggelaten worden)
Afbeelding
Robin Huurman
wmpr
 
Berichten: 7
Geregistreerd: 05 dec 2007 18:08

Re: Niet weergeven als categorie geen posts bezit.

Berichtdoor ElbertF » 15 jan 2008 18:50

phpBB3 heeft prachtige template-functies waar je hetzelfde mee kan bereiken. Ik ben niet erg bekend met de syntax maar het komt neer op iets als dit:



Lijkt me makkelijker dan de PHP te hacken.
Avatar gebruiker
ElbertF
wmpr
 
Berichten: 1310
Geregistreerd: 14 nov 2007 22:09

Re: Niet weergeven als categorie geen posts bezit.

Berichtdoor Remi » 15 jan 2008 18:52

Ik snap je voor de helft.
Maar zou je het stuk van je script kunnen plaatsen waarin je dit doet?
Dit vind ik iets makkelijker om mij op te orrienteren. ;)

Remi
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Niet weergeven als categorie geen posts bezit.

Berichtdoor BetaDevil » 15 jan 2008 18:56

Laatst bijgewerkt door BetaDevil op 15 jan 2008 19:17, in totaal 1 keer bewerkt.
BetaDevil
wmpr
 
Berichten: 362
Geregistreerd: 27 nov 2007 18:51

Re: Niet weergeven als categorie geen posts bezit.

Berichtdoor Robin Huurman » 15 jan 2008 19:14

Ziehier de bestanden:



Robin Huurman
wmpr
 
Berichten: 7
Geregistreerd: 05 dec 2007 18:08

Re: Niet weergeven als categorie geen posts bezit.

Berichtdoor Robin Huurman » 15 jan 2008 20:06

Robin Huurman
wmpr
 
Berichten: 7
Geregistreerd: 05 dec 2007 18:08


Keer terug naar PHP, ASP, SQL



cron