I have just finished my custom theme (derived from the "Blue-Round Corners" theme) and am in the process of integrating Phoca Download with my website.
I would like to change the .pd category background image to an image defined by each category itself.
I know each category can have an image "attached" to it, as noticed in the edit/add category page.
Code: Select all
/* sections, section */
#phoca-dl-sections-box .pd-category,
#phoca-dl-section-box .pd-category {
font-size: 18px;
padding-left:20px;
background: transparent url('images/folder.png') 0 0 no-repeat;
}
Im trying to find a way to retreive the actual image from the database.
Does anyone know how I can go about doing this?
I am new to joomla's framework and am unsure of where I can start to edit it.
You can view the page im referring to here: http://eternalwolf.com/main/ew-download ... -downloads
In the mean time, ill start looking at default.php
Thank You for your support.
-Vince
EDIT:
Hello Again,
I have edited and coded it which might work, to my knowledge, but i cant seem to get the file name from the database for each category. The src attribute actually displays the full url to the stories folder itself, instead of the images in that folder.
I edited default.php in the "com_phocadownload/views/section/tmpl/" directory.
The code starts at line 33 in default.php.
Code: Select all
if (!empty($this->categorylist)) {
foreach ($this->categorylist as $valueCat) {
echo '<p class="pd-category">';
/* NEW ADDITION */
echo '<img class="pd-category-image" src="http://www.eternalwolf.com/main/images/stories';
$dbimage = mysql_query("SELECT image FROM #__phocadownload_categories WHERE id = $valueCat->id");
echo '/'.$dbimage.' ">';
/* END NEW ADDITION */
echo '<a href="'. JRoute::_('index.php?option=com_phocadownload&view=category&id='.$valueCat->id.':'.$valueCat->alias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $valueCat->title.'</a>';
echo ' <small>('.$valueCat->numdoc.')</small></p>' . "\n";
}
echo '</div>';
} else {
echo '<p> </p><p> </p>';
}
?></div>
Regards, Vince.