Hi there, I have been playing with the php to make it a bit more "custom" and to achieve my goal...
everything seems to be ok, until I hit the wall...
what I want is to add a background color to the Title of the event or to the category of the X event...
now the color has to be the one that has been assigned to the category in the back-end so when the module display the information each event can have the background color of each category in question.
Event X
Category A
Event F
Category B
I did a search and I find this
joomdonation.com/62-general-discussion/1...eb_events.html#16723
but still, I can get the value of color_code
all i get in result is "Array", of curse I only used the info on the link as a reference in order to get what I want but I can't
From mod_eb_events
file mod_eb_events.php
Line more or less 38:
Code:
$sql = 'SELECT a.id, a.name, FROM #__eb_categories AS a INNER JOIN...
I added the color_code as follow
Code:
$sql = 'SELECT a.id, a.name, a.color_code FROM #__eb_categories AS a INNER JOIN
then after "$itemCategories[] = ..." I added the following
"$colorBG = $row->color_code;"
then on file tmpl/default.php
I added just an echo as follow
Code:
<?php echo $colorBg; ?>
but before that and before I came to your website I did a hundred more combinations and nothing worked...
I wanted to do it on my own, but after one day looking for a solution... I guess, I'm just tired...
I'm not a programer or anything, I'm just want to learn...
So how can I get the category color assigned on the back end?
once I get the color_code value, I guess I can apply the code to anything I want...
something like
<td <?php echo 'style="background-color:#'.$color.'";' ; ?>>
or
<span <?php echo 'style="color:#'.$color.'";' ; ?>>
I want to use this value for
mod_eb_events
Thank you! for taking the time..