Egendefinere cbcquery-layout (Delvis løst)

Her er både spørsmål og gode idéer/forslag

Moderators: sone12, Per Yngve Berg

Locked
User avatar
johneliassen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 202
Joined: Tue Nov 20, 2007 12:44 pm

Egendefinere cbcquery-layout (Delvis løst)

Post by johneliassen » Sun Apr 20, 2008 3:52 pm

Jeg bruker cbcquery-modulen for å få siste forumaktivitet i en modul.

Den lister nå trådene under en <ul><li>-funksjon, og dette er noe jeg ikke ønsket. Jeg fjernet derfor fysisk alle <ul> og <li>-funksjoner fra mod_cbcquery.php ! Men nå kommer den vanskelige delen :p

Slik ser det ut nå - Bilde nr 1
Image

Slik burde det se ut - Bilde nr 2
Image

Dette må vel være fysisk mulig å få til? Ikonet til venstre kan være identisk på alle linjer, trenger ikke forandres i forhold til trådens væremåte. Annenhver linje med forskjellige bakgrunner?

Her er koden til cbcquery.php - Og det jeg lurer på er hvordan jeg så enkelt som mulig kan få det til å se ut som på bilde nr 2.

Code: Select all

<?php

/**

* @package CBC Query Module

* @version 1.0.x

* @copyright (C) 2006, 2007 gatenet.nl, and Greg Effland

* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU/LGPL

* @description This is a module to allow showing various interactive forum information in Joomla!

* Module greatly recoded by Greg Effland and based on the CB Connector Plugin

* This Module based on the info below this line

* Module développé pour joomla par Stéphane Fournier, Développez ce module si vous le voulez, transmettez-le, mais laisser ces 2 #premières lignes. Infos, nouvelles versions, faq, corrections, sont sur www.stephanefournier.com

* Mod_lasttopics version 1.3.0

*/

	// no direct access

	defined( '_VALID_MOS' ) or die( 'Restricted access' );



	// include code so it can find the CB Connector

	global $mosConfig_live_site, $mosConfig_absolute_path, $mosConfig_lang, $forum, $joomla_root_path, $joomla_root_site, $_REQUEST;

	global $ForumDatabase;

	global $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix;

	//$ForumDatabase = new database( $dbhost, $dbuser, $dbpasswd, $dbname, $table_prefix );

	$modulePath = dirname( __FILE__ );

	$basePath = $mosConfig_absolute_path.'/components/com_comprofiler/plugin/user/plug_cbconnector';

	if (!file_exists($basePath.'/cbconnector.php')) {

		echo '<a><b>The CB Connector Plugin can not be found at :'.$basePath.'/cbconnector.php...</b></a>';

		exit();

	}

	require_once($basePath.'/plugininfo.php');

	require_once($basePath.'/language_includes.php');

	require_once($basePath.'/databasefunctions.php');

	require_once($basePath.'/functions.php');

	require_once($basePath.'/pluginfunctions.php');

	if (!pluginPublished()) {

		echo '<a><b>The CB Connector Plugin is not currently published.</b></a>';

	} else {

	//	require_once("xajax.inc.php");

		$joomla_root_path=$mosConfig_absolute_path;

		$joomla_root_site=$mosConfig_live_site;

		$varSiteEncoding = siteEncoding();

		$varSiteDBEncoding = siteDBEncoding();

		$varForumDBEncoding = forumDBEncoding();

		//substitute the URL here from the $forum link

		//Get parameters

		$moduleclass_sfx 	= $params->get( 'moduleclass_sfx',	'' );

		$querytype			= $params->get( 'querytype',		'LastCreatedTopics' );

		$qtytoshow			= $params->get( 'qtytoshow',		5 );

		$maxwidth			= $params->get( 'maxwidth',			35 );

		$linkheading		= $params->get( 'linkheading',		'Go to the Forum...' );

		$showlinkheading	= $params->get( 'showlinkheading',	1 );

		$pmheading			= $params->get( 'pmheading',		'View My PMs...' );

		$showpmlink			= $params->get( 'showpmlink',		0 );

		$showtime			= $params->get( 'showtime',			1 );

		$showauthor			= $params->get( 'showauthor',		1 );

		$showforum			= $params->get( 'showforum',		1 );

		$showreplies		= $params->get( 'showreplies',		1 );

		$targetType 		= $params->def( 'target',			0 );

		//$autologin 			= $params->def( 'autologin',		1 );

		//maybe add param so that the admin can chose which forums to include

	

		$sid= Null;

		$forumid = getforumID($my->id);

		$phpbbSessionValid = false;

		if ($forumid!='') {

			$phpbbSessionValid = $forum->currentValidSession($forumid);

			if (!$phpbbSessionValid) {

				//die('start session');

				//start up a phpbb session

				$forum->startsession($my, $autologin);

				$phpbbSessionValid = $forum->currentValidSession($forumid);

			}

		}

		$validid = $forum->validForumID($forumid);

		if ($validid) {

			$sid = $forum->getsessionID($forumid);

		}	

		

		switch ($targetType){

			case 0: //per CBConnector

				$target=hyperlinktarget();

				break;

			case 1: // in CBC Wrapper

				$target=2;

				break;

			case 2: // in Same Window

				$target=1;

				break;

			case 3:	// in New Window

				$target=0;

				break;

		}

		switch ($target){

			case 0:	//new window

				$targettext = " target = '_blank'";

				break;

			case 1:	// same window

			case 2: // CBC Wrapper

				$targettext = '';

				break;

		}

	

		switch ($querytype){

			case 'LastCreatedTopics':

			case 'MostRepliedTopics':

				$timeok = true;

				$authorok = true;

				$forumok = true;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Trådstarter : ';

				$forumphrase = 'Forum : ';

				$repliesphrase = 'Antall innlegg: ';

				break;

			case 'LastAnsweredTopics':

				$timeok = true;

				$authorok = true;

				$forumok = true;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Skrevet av ';

				$forumphrase = 'Forum : ';

				$repliesphrase = 'Antall innlegg : ';

				break;

			case 'MostViewedTopics':

				$timeok = true;

				$authorok = true;

				$forumok = true;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Trådstarter : ';

				$forumphrase = 'Forum : ';

				$repliesphrase = 'Visninger : ';

				break;

			case 'LastPosts':

			case 'MyLastPosts':

			case 'MyLastAnsweredPosts':

				$timeok = true;

				$authorok = true;

				$forumok = true;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Innlegg av : ';

				$forumphrase = 'Forum : ';

				$repliesphrase = 'Antall innlegg : ';

				break;

			case 'MostActiveUsers':

			case 'LeastActiveUsers':

			case 'NewestUsers':

			case 'LastVisitingUsers':

				$timeok = false;

				$authorok = true;

				$forumok = true;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Registrert : <br />';

				$forumphrase = 'Siste besøksdato : <br />';

				$repliesphrase = 'Antall innlegg : ';

				// keep it on the same window since it is using comprofiler's

				break;

			case 'UsersInUsergroup':

				$timeok = false;

				$authorok = false;

				$forumok = false;

				$repliesok = false;

				$timephrase = '';

				$authorphrase = '';

				$forumphrase = '';

				$repliesphrase = '';

				break;

			case 'MyNewPrivateMessages':

			case 'MyUnreadPrivateMessages':

			case 'MyReceivedPrivateMessages':

				$timeok = true;

				$authorok = true;

				$forumok = false;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Fra : ';

				$forumphrase = '';

				$repliesphrase = 'Status : <br />';

				break;

			case 'MySentPrivateMessages':

				$timeok = true;

				$authorok = true;

				$forumok = false;

				$repliesok = true;

				$timephrase = '';

				$authorphrase = 'Til : ';

				$forumphrase = '';

				$repliesphrase = 'Status : <br />';

				break;

			case 'GeneralForumStatisics':

				$timeok = false;

				$authorok = false;

				$forumok = false;

				$repliesok = false;

				$timephrase = '';

				$authorphrase = '';

				$forumphrase = '';

				$repliesphrase = '';

				break;

			default:

				$timeok = false;

				$authorok = false;

				$forumok = false;

				$repliesok = false;

				$timephrase = '';

				$authorphrase = '';

				$forumphrase = '';

				$repliesphrase = '';

		}

	

		// CBC will return text, text2, href, href2 as returns

		// Send info to CBC to get results from Query

		$results = $forum->getCBCqueryResults($target, $forumid, $querytype, $qtytoshow, $maxwidth, $sid);

		echo "";

	

		echo "";

		foreach ($results as $result){

			$posttime=""; $postauthor=""; $forumname=""; $replies="";

			if ($result->full_text=='') {

				$fulltext = '';

			} else {

				$fulltext = '<strong>'.cbcConvertEncoding(str_replace("'", "\'", $result->full_text), $varSiteEncoding, $varForumDBEncoding).'</strong><br />';

			}

			if ($showtime==1 and $timeok){

				$days=''; $hours=''; $minutes='';

				$resTime = $result->time;

				if (trim($resTime)!=''){

					$difference = time() - $resTime;

					//$days=''; $hours=''; $minutes='';

					if ($difference>=86400) {

						$days = (int)(($difference/86400));

						$difference = $difference - $days*86400;

						$days .='d ';

					}

					if ($difference>=3600) {

						$hours = (int)(($difference/3600));

						$difference = $difference - $hours *3600;

						$hours .='h ';

					}

					if ($difference>=60) {

						//$minutes = (int)(($difference/60)-(60*$hours));

						$minutes = (int)(($difference/60));

						$minutes .='min';

					}

					$time = $timephrase.'('.$days.$hours.$minutes.')';

					$posttime = $time;

				}

			}

				

			if ($showauthor==1 and $authorok){

				$postauthor = $authorphrase.'<strong>'.cbcConvertEncoding($result->author, $varSiteEncoding, $varForumDBEncoding).'</strong><br />';

			}

	

			if ($showforum==1 and $forumok){

				$forumname = $forumphrase.'<strong>'.cbcConvertEncoding($result->forum, $varSiteEncoding, $varForumDBEncoding).'</strong><br />';

			}

	

			if ($showreplies==1 and $repliesok){

				$replies = $repliesphrase.'<strong>'.$result->replies.'</strong><br />';

			}

			if (strpos($result->href, 'com_comprofiler')>0) {

				$targettext= '';

			}

			$overlibText = $fulltext." ".$postauthor." ".$forumname." ".$replies." ".$posttime;

			if (trim($overlibText)=='') {

				if (trim($result->href)=='') {

					echo "<a>".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";

				} else {

					echo "<a href='".$result->href."'".$targettext.">".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";

				}

			} else {

				if (trim($result->href)=='') {

					echo "<a ".$overlibText."

					".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";

				} else {

					echo "<a href='".$result->href."'".$targettext."  

					".$overlibText."

					".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";

				}

			}

			//echo "<br />";

		}

		echo "";

		if ($showlinkheading AND $linkheading<>'') {

			echo "<br />";

			echo "<a href='".$forum->getForumRootURL($forumid, NULL, true, $target)."'".$targettext.">".cbcConvertEncoding($linkheading, $varSiteEncoding, $varForumDBEncoding)."</a>";

		}

		if ($showpmlink AND $pmheading<>'') {

			echo "<br />";

			echo "<a href='".$forum->getPrivateMessageInboxURL($forumid, NULL, true, $target)."'".$targettext.">".cbcConvertEncoding($pmheading, $varSiteEncoding, $varForumDBEncoding)."</a>";

		}

	}	

?>

Oppdateringer
1. Jeg fjernet alle <ul><li>-signaturer i mod_cbcquery.php for å få vekk den irriterende listingen.
2. Jeg fjernet javascript-funksjonen fra mod_cbcquery.php for å slippe hovereffekten for å få info om tråden.

User avatar
jonascw
Joomla! Explorer
Joomla! Explorer
Posts: 367
Joined: Fri Dec 29, 2006 12:09 pm
Location: Norway
Contact:

Re: Egendefinere cbcquery-layout (Delvis løst)

Post by jonascw » Mon Apr 28, 2008 9:40 pm

Hei,

Sorry for stavingen, men jeg er svensk:-)

Fra koden som du har postet, ser det ut som de som skrevet komponenten ikke har lagt til et html lager. Uten legger både php og html i samme fil "cbcquery.php". Det er anbefalt at dele kode og presentasjonslager av joomlautviklare, men det går at ikke gjøre det.

Nå har jeg ingen kjennskap til komponenten og heller ikke til din kunskap av php. Men jeg prøver meg på et sjapt svar, håper det er ok med deg.

Det ser ut som at phpkoden ikke legger in de ulike arrayelementen i <tr> eller <div> tagger uten bruker <br> og då finns det ingen beholdere at endre background-color på. Det man vanligtvis gjør er at man setter in en konstant "$k" som endrer seg for vart ellement i en array, og bruker den konstanten i "class"

I følgende eksempel så blir "class" = "row0" eller "row1" for vart arrayelement og då kan du ha forskjellig background-color i css-filen.

Code: Select all

<?php
	$k = 0;
	for ($i=0, $n=count( $rows ); $i < $n; $i++) {
		$row = &$rows[$i];
		?>
		<tr class="<?php echo "row$k"; ?>">
			<td>
				din output
			</td>
		</tr>
<?php
	$k = 1 - $k;
	}
    ?>
Som jeg nemnde så kjenner jeg ikke komponenten og det kan vare noen som har enenklere løsning, men enligt meg så trur jeg at komponenten må modifiseres en hel del for at få den effekten du ønsker.

Håper at svaret er til noen hjelp

Jonas

User avatar
johneliassen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 202
Joined: Tue Nov 20, 2007 12:44 pm

Re: Egendefinere cbcquery-layout (Delvis løst)

Post by johneliassen » Mon Apr 28, 2008 11:09 pm

Hei :-) Tusen takk for tips. Men vi løste det med litt manipulering av mod_cbcquery.php og stilarket/css.

Slik ser mod_cbcquery.php ut

Code: Select all

<?php



/**



* @package CBC Query Module



* @version 1.0.x



* @copyright (C) 2006, 2007 gatenet.nl, and Greg Effland



* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU/LGPL



* @description This is a module to allow showing various interactive forum information in Joomla!



* Module greatly recoded by Greg Effland and based on the CB Connector Plugin



* This Module based on the info below this line



* Module développé pour joomla par Stéphane Fournier, Développez ce module si vous le voulez, transmettez-le, mais laisser ces 2 #premières lignes. Infos, nouvelles versions, faq, corrections, sont sur www.stephanefournier.com



* Mod_lasttopics version 1.3.0



*/



	// no direct access



	defined( '_VALID_MOS' ) or die( 'Restricted access' );







	// include code so it can find the CB Connector



	global $mosConfig_live_site, $mosConfig_absolute_path, $mosConfig_lang, $forum, $joomla_root_path, $joomla_root_site, $_REQUEST;



	global $ForumDatabase;



	global $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix;



	//$ForumDatabase = new database( $dbhost, $dbuser, $dbpasswd, $dbname, $table_prefix );



	$modulePath = dirname( __FILE__ );



	$basePath = $mosConfig_absolute_path.'/components/com_comprofiler/plugin/user/plug_cbconnector';



	if (!file_exists($basePath.'/cbconnector.php')) {



		echo '<a><b>The CB Connector Plugin can not be found at :'.$basePath.'/cbconnector.php...</b></a>';



		exit();



	}



	require_once($basePath.'/plugininfo.php');



	require_once($basePath.'/language_includes.php');



	require_once($basePath.'/databasefunctions.php');



	require_once($basePath.'/functions.php');



	require_once($basePath.'/pluginfunctions.php');



	if (!pluginPublished()) {



		echo '<a><b>The CB Connector Plugin is not currently published.</b></a>';



	} else {



	//	require_once("xajax.inc.php");



		$joomla_root_path=$mosConfig_absolute_path;



		$joomla_root_site=$mosConfig_live_site;



		$varSiteEncoding = siteEncoding();



		$varSiteDBEncoding = siteDBEncoding();



		$varForumDBEncoding = forumDBEncoding();



		//substitute the URL here from the $forum link



		//Get parameters



		$moduleclass_sfx 	= $params->get( 'moduleclass_sfx',	'' );



		$querytype			= $params->get( 'querytype',		'LastCreatedTopics' );



		$qtytoshow			= $params->get( 'qtytoshow',		5 );



		$maxwidth			= $params->get( 'maxwidth',			35 );



		$linkheading		= $params->get( 'linkheading',		'Go to the Forum...' );



		$showlinkheading	= $params->get( 'showlinkheading',	1 );



		$pmheading			= $params->get( 'pmheading',		'View My PMs...' );



		$showpmlink			= $params->get( 'showpmlink',		0 );



		$showtime			= $params->get( 'showtime',			1 );



		$showauthor			= $params->get( 'showauthor',		1 );



		$showforum			= $params->get( 'showforum',		1 );



		$showreplies		= $params->get( 'showreplies',		1 );



		$targetType 		= $params->def( 'target',			0 );



		//$autologin 			= $params->def( 'autologin',		1 );



		//maybe add param so that the admin can chose which forums to include



	



		$sid= Null;



		$forumid = getforumID($my->id);



		$phpbbSessionValid = false;



		if ($forumid!='') {



			$phpbbSessionValid = $forum->currentValidSession($forumid);



			if (!$phpbbSessionValid) {



				//die('start session');



				//start up a phpbb session



				$forum->startsession($my, $autologin);



				$phpbbSessionValid = $forum->currentValidSession($forumid);



			}



		}



		$validid = $forum->validForumID($forumid);



		if ($validid) {



			$sid = $forum->getsessionID($forumid);



		}	



		



		switch ($targetType){



			case 0: //per CBConnector



				$target=hyperlinktarget();



				break;



			case 1: // in CBC Wrapper



				$target=2;



				break;



			case 2: // in Same Window



				$target=1;



				break;



			case 3:	// in New Window



				$target=0;



				break;



		}



		switch ($target){



			case 0:	//new window



				$targettext = " target = '_blank'";



				break;



			case 1:	// same window



			case 2: // CBC Wrapper



				$targettext = '';



				break;



		}



	



		switch ($querytype){



			case 'LastCreatedTopics':



			case 'MostRepliedTopics':



				$timeok = true;



				$authorok = true;



				$forumok = true;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Trådstarter : ';



				$forumphrase = 'Forum : ';



				$repliesphrase = 'Antall innlegg: ';



				break;



			case 'LastAnsweredTopics':



				$timeok = true;



				$authorok = true;



				$forumok = true;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Skrevet av ';



				$forumphrase = 'Forum : ';



				$repliesphrase = 'Antall innlegg : ';



				break;



			case 'MostViewedTopics':



				$timeok = true;



				$authorok = true;



				$forumok = true;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Trådstarter : ';



				$forumphrase = 'Forum : ';



				$repliesphrase = 'Visninger : ';



				break;



			case 'LastPosts':



			case 'MyLastPosts':



			case 'MyLastAnsweredPosts':



				$timeok = true;



				$authorok = true;



				$forumok = true;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Innlegg av : ';



				$forumphrase = 'Forum : ';



				$repliesphrase = 'Antall innlegg : ';



				break;



			case 'MostActiveUsers':



			case 'LeastActiveUsers':



			case 'NewestUsers':



			case 'LastVisitingUsers':



				$timeok = false;



				$authorok = true;



				$forumok = true;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Registrert : <br />';



				$forumphrase = 'Siste besøksdato : <br />';



				$repliesphrase = 'Antall innlegg : ';



				// keep it on the same window since it is using comprofiler's



				break;



			case 'UsersInUsergroup':



				$timeok = false;



				$authorok = false;



				$forumok = false;



				$repliesok = false;



				$timephrase = '';



				$authorphrase = '';



				$forumphrase = '';



				$repliesphrase = '';



				break;



			case 'MyNewPrivateMessages':



			case 'MyUnreadPrivateMessages':



			case 'MyReceivedPrivateMessages':



				$timeok = true;



				$authorok = true;



				$forumok = false;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Fra : ';



				$forumphrase = '';



				$repliesphrase = 'Status : <br />';



				break;



			case 'MySentPrivateMessages':



				$timeok = true;



				$authorok = true;



				$forumok = false;



				$repliesok = true;



				$timephrase = '';



				$authorphrase = 'Til : ';



				$forumphrase = '';



				$repliesphrase = 'Status : <br />';



				break;



			case 'GeneralForumStatisics':



				$timeok = false;



				$authorok = false;



				$forumok = false;



				$repliesok = false;



				$timephrase = '';



				$authorphrase = '';



				$forumphrase = '';



				$repliesphrase = '';



				break;



			default:



				$timeok = false;



				$authorok = false;



				$forumok = false;



				$repliesok = false;



				$timephrase = '';



				$authorphrase = '';



				$forumphrase = '';



				$repliesphrase = '';



		}



	



		// CBC will return text, text2, href, href2 as returns



		// Send info to CBC to get results from Query



		$results = $forum->getCBCqueryResults($target, $forumid, $querytype, $qtytoshow, $maxwidth, $sid);



		echo "";



	



		echo "";



		foreach ($results as $result){



			$posttime=""; $postauthor=""; $forumname=""; $replies="";



			if ($result->full_text=='') {



				$fulltext = '';



			} else {



				$fulltext = '<strong>'.cbcConvertEncoding(str_replace("'", "\'", $result->full_text), $varSiteEncoding, $varForumDBEncoding).'</strong><br />';



			}



			if ($showtime==1 and $timeok){



				$days=''; $hours=''; $minutes='';



				$resTime = $result->time;



				if (trim($resTime)!=''){



					$difference = time() - $resTime;



					//$days=''; $hours=''; $minutes='';



					if ($difference>=86400) {



						$days = (int)(($difference/86400));



						$difference = $difference - $days*86400;



						$days .='d ';



					}



					if ($difference>=3600) {



						$hours = (int)(($difference/3600));



						$difference = $difference - $hours *3600;



						$hours .='h ';



					}



					if ($difference>=60) {



						//$minutes = (int)(($difference/60)-(60*$hours));



						$minutes = (int)(($difference/60));



						$minutes .='min';



					}



					$time = $timephrase.'('.$days.$hours.$minutes.')';



					$posttime = $time;



				}



			}



				



			if ($showauthor==1 and $authorok){



				$postauthor = $authorphrase. cbcConvertEncoding($result->author, $varSiteEncoding, $varForumDBEncoding);



			}



	



			if ($showforum==1 and $forumok){



				$forumname = $forumphrase.'<strong>'.cbcConvertEncoding($result->forum, $varSiteEncoding, $varForumDBEncoding).'</strong><br />';



			}



	



			if ($showreplies==1 and $repliesok){



				$replies = $repliesphrase.'<strong>'.$result->replies.'</strong><br />';



			}



			if (strpos($result->href, 'com_comprofiler')>0) {



				$targettext= '';



			}



			$overlibText = $fulltext." <a id='forumaktivitet_author'>".$postauthor." ".$forumname." ".$replies." ".$posttime."</a>";



			if (trim($overlibText)=='') {



				if (trim($result->href)=='') {



					echo "<img src='http://www.mystudio.no/forumicon.png' style='width: 18px; height: 18px;'> <a>".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";



				} else {



					echo "<a href='".$result->href."'".$targettext.">".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";



				}



			} else {



				if (trim($result->href)=='') {



					echo "<a ".$overlibText."



					".cbcConvertEncoding($result->text, $varSiteEncoding, $varForumDBEncoding)."</a><br />";



				} else {



					echo "<a id='forumaktivitet_image' href='".$result->href."'".$targettext."> <img src='http://www.playnow.no/forumicon.png'></a>  



					".$overlibText."



					".cbcConvertEncoding(/*$result->text, $varSiteEncoding, $varForumDBEncoding*/)."</a><br />";



				}



			}



			//echo "<br />";



		}



		echo "";



		if ($showlinkheading AND $linkheading<>'') {



			echo "<br />";



			echo "<a href='".$forum->getForumRootURL($forumid, NULL, true, $target)."'".$targettext.">".cbcConvertEncoding($linkheading, $varSiteEncoding, $varForumDBEncoding)."</a>";



		}



		if ($showpmlink AND $pmheading<>'') {



			echo "<br />";



			echo "<a href='".$forum->getPrivateMessageInboxURL($forumid, NULL, true, $target)."'".$targettext.">".cbcConvertEncoding($pmheading, $varSiteEncoding, $varForumDBEncoding)."</a>";



		}



	}	



?>
Slik ser aktuelt stilark ut

Code: Select all

#forumaktivitet {
	background-image: url("http://www.playnow.no/forumaktivitet_bg.png");
	padding-left: 2px;
	width: 244px;
	color: #5D5D5D;
	font-family: Trebuchet MS;
	font-size:11px;
	height: 8px;
}
#forumaktivitet_author {
	padding-left: 2px;
        padding-bottom: 0px;
	width: 244px;
	color: #5D5D5D;
	font-family: Trebuchet MS;
	font-size:10px;
	height: 0px;
}
#forumaktivitet_image img { 
	border: none; 
	float: left;
	padding-right: 8px;
}
Resultatet ble:

Image


Locked

Return to “Template, CSS og design”