Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
Sample Code (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Sample Code
#17
Sample Code 1 Year, 6 Months ago  
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit dolor ac diam. Nulla tellus purus, mollis eu, pretium at, vehicula vel, odio. Vestibulum accumsan vulputate tortor. Aenean lobortis erat vel magna. Cras viverra nisl non enim. Fusce nibh pede, pellentesque vitae, adipiscing eget, vestibulum id, arcu. Nullam sed erat sed odio tempor malesuada. Sed at erat. Praesent interdum dapibus neque. Mauris tincidunt.

[code:1]
foreach ( $rows as $row ) {
// get Itemid
switch ( $type ) {
case 2:
$query = "SELECT id"
. "n FROM #__menu"
. "n WHERE type = 'content_typed'"
. "n AND componentid = " . (int) $row->id
;
$database->setQuery( $query );
$Itemid = $database->loadResult();
break;

case 3:
if ( $row->sectionid ) {
$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );
} else {
$query = "SELECT id"
. "n FROM #__menu"
. "n WHERE type = 'content_typed'"
. "n AND componentid = " . (int) $row->id
;
$database->setQuery( $query );
$Itemid = $database->loadResult();
}
break;

case 1:
default:
$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );
break;
}

// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = '';
} else {
$Itemid = '&Itemid='. $Itemid;
}

$link = sefRelToAbs( 'index.php?option=com_content&task=view&id='. $row->id . $Itemid );
?>


[/code:1]
administrator (Admin)
FB Core Team
best of joomla
Moderator
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
ICQ#: 123456789 Gender: Male skype@skype.com yahoo@yahoo.com msn@msn.com aim@aim.com Location: USA Birthdate: 1978-10-31
Logged Logged
 
Best of Joomla!
 
The administrator has disabled public write access.  
#52012
Re:Sample Code 3 Months, 4 Weeks ago  
Another Test...

Code:

<?php
foreach ( $rows as $row ) {
// get Itemid
switch ( $type ) {
case 2:
$query = "SELECT id"
. "n FROM #__menu"
. "n WHERE type = 'content_typed'"
. "n AND componentid = " . (int) $row->id
;
$database->setQuery( $query );
$Itemid = $database->loadResult();
break;

case 3:
if ( $row->sectionid ) {
$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );
} else {
$query = "SELECT id"
. "n FROM #__menu"
. "n WHERE type = 'content_typed'"
. "n AND componentid = " . (int) $row->id
;
$database->setQuery( $query );
$Itemid = $database->loadResult();
}
break;

case 1:
default:
$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs );
break;
}

// Blank itemid checker for SEF
if ($Itemid == NULL) {
$Itemid = '';
} else {
$Itemid = '&amp;Itemid='. $Itemid;
}

$link = sefRelToAbs( 'index.php?option=com_content&amp;task=view&amp;id='. $row->id . $Itemid );
?>

Edi (User)
Fresh Boarder
Posts: 12
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#52088
Re:Sample Code 3 Months, 4 Weeks ago  
sdefsdf
firesta (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/06/17 22:03 By firesta.
 
The administrator has disabled public write access.  
Go to top