× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

question mod_joodb

More
11 years 1 month ago - 11 years 1 month ago #1693 by Dirk
Replied by Dirk on topic Re: question mod_joodb
Sorry but I did not recognize that you meant the module output.
You can not use Joodb commands in module. It's not a template.

You can override the output by crating a "mod_joodb" folder in your
"template/html" folder and copying the the default.php into that folder.

Please look here:
docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core

To insert an image your Output would be something like this
<?php
// no direct access
defined('_JEXEC') or die;
?>
<?php if (!empty($items)) : ?>
<div class="joodb_module<?php echo $moduleclass_sfx ?>" >
<?php if (!empty($pretext)) echo "<p>".nl2br($pretext)."</p>"; ?>
<ul>
	<?php foreach($items as $n => $item) :?>
<?php
// the thumbnail image
$img = JURI::root(true)."/images/joodb/db".$jb->id."/img".$item->{$jb->fid}."-thumb.jpg";
?>
		<li>
			<a class="joodb_module_link" href="<?php echo modJoodbHelper::getRoute($item->{$jb->fid}, $item->{$jb->ftitle}, $jb); ?>" >
<img src="<?php echo $thumb; ?>" style="width: 80px; float: right;" />
<?php echo $item->{$jb->ftitle} ?></a><br/>
			<?php if ($params->get('show_date')=="1" && !empty($jb->fdate)) 
				echo '<small class="small">'.JHTML::_('date', $item->{$jb->fdate}, JText::_('DATE_FORMAT_LC3')).'</small><br/>'; ?>		
			<?php if ($params->get('show_teaser')=="1") 
				echo (!empty($jb->fabstract)) ? strip_tags($item->{$jb->fabstract}) : JoodbHelper::wrapText($item->{$jb->fcontent},60);
			?>
		</li>
	<?php endforeach; ?>
</ul>	
</div>
<?php endif;?>
Last edit: 11 years 1 month ago by Dirk.

Please Log in to join the conversation.

More
11 years 1 month ago #1696 by mikhaelm
Replied by mikhaelm on topic Re: question mod_joodb
Hi,
that is, if name image file is in the database can not be used in the module?

Please Log in to join the conversation.

More
11 years 1 month ago #1697 by Dirk
Replied by Dirk on topic Re: question mod_joodb
It's a module.

Not with the {joodb} commands.
It's normal PHP/Html oputput.

Please look at the php example.
Replace it with default.php of the
module.

Please Log in to join the conversation.

More
11 years 1 month ago #1698 by mikhaelm
Replied by mikhaelm on topic Re: question mod_joodb
the component is a sample database, it is a field picture, there is stored image file name, so why should it file name, if more as a component in them you can not use. By id pictures can just point and pull the id, and the pictures to name pictures as the id and then do not need a name to put into the database, the meaning of this function is lost

sorry for my English

Please Log in to join the conversation.

More
11 years 1 month ago #1701 by joest
Replied by joest on topic Re: question mod_joodb
sorry - i don´t understand your question at all ... please try again

Please Log in to join the conversation.

More
11 years 1 month ago #1702 by mikhaelm
Replied by mikhaelm on topic Re: question mod_joodb
Hi,
1. I need the name of the image file was in the database component joodb showing on module
2. the second question is joodb.feenders.de/forum/6-bug-reporting/...s-not-work.html#1689

Please Log in to join the conversation.

Moderators: Dirkjoest