Home Forum
Qivva Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Tooltip: Category after description
(0 viewing) 
Go to bottom
TOPIC: Tooltip: Category after description
#951
pauldg
Fresh Boarder
Posts: 2
graphgraph
User Offline
Re:Tooltip: Category after description 10 Years, 11 Months ago Karma: 0
OK to get the Category Name from the SQL, in helper.php, change:

SELECT a.dates, a.times, a.enddates,a.title, DAYOFMONTH(a.dates) AS created_day, YEAR(a.dates) AS created_year, MONTH(a.dates) AS created_month'

to:

SELECT a.dates, a.times, a.enddates,a.title, c.catname, DAYOFMONTH(a.dates) AS created_day, YEAR(a.dates) AS created_year, MONTH(a.dates) AS created_month'

Then a bit further down in the code, modify:

$title = htmlspecialchars($event->title);

To become:

$title = htmlspecialchars($event->title) . ' (' . $event->catname . ')';

And

$title = $tt . '&#013 +' . htmlspecialchars($event->title);

To be:

$title = $tt . '&#013 +' . htmlspecialchars($event->title) . ' (' . $event->catname . ')';


(I admit I know little about what I'm changing there and it's possible only one of those lines is actually necessary. I suspect for full hack-resistance you should probably wrap the "$event->catname" inside a htmlspecialchars call too but I don't know for sure and the above worked for me so...)
 
Logged Logged
 
Last Edit: 2008/11/07 15:15 By .
  The administrator has disabled public write access.
#953
admin
Platinum Boarder
Posts: 677
graphgraph
User Offline
Re:Tooltip: Category after description 10 Years, 11 Months ago Karma: 14
Looks good to me

Please use htmlspecialchars. This deals with things like quotes and ampersands if you have them in your Category names.

Code:

 htmlspecialchars($event->catname)


Thanks for looking into it. I never had time.
I'll add this as an option in the next version of the calendar I bring out.

Regards
Toni
 
Logged Logged
  The administrator has disabled public write access.
#954
bole
Fresh Boarder
Posts: 11
graphgraph
User Offline
Re:Tooltip: Category after description 10 Years, 11 Months ago Karma: 0
Thanks for your great help!

Excellent mate!
 
Logged Logged
  The administrator has disabled public write access.
#957
bole
Fresh Boarder
Posts: 11
graphgraph
User Offline
Re:Tooltip: Category after description 10 Years, 11 Months ago Karma: 0
pauldg wrote:
OK to get the Category Name from the SQL, in helper.php, change:

SELECT a.dates, a.times, a.enddates,a.title, DAYOFMONTH(a.dates) AS created_day, YEAR(a.dates) AS created_year, MONTH(a.dates) AS created_month'

to:

SELECT a.dates, a.times, a.enddates,a.title, c.catname, DAYOFMONTH(a.dates) AS created_day, YEAR(a.dates) AS created_year, MONTH(a.dates) AS created_month'

Then a bit further down in the code, modify:

$title = htmlspecialchars($event->title);

To become:

$title = htmlspecialchars($event->title) . ' (' . $event->catname . ')';

And

$title = $tt . '&#013 +' . htmlspecialchars($event->title);

To be:

$title = $tt . '&#013 +' . htmlspecialchars($event->title) . ' (' . $event->catname . ')';


(I admit I know little about what I'm changing there and it's possible only one of those lines is actually necessary. I suspect for full hack-resistance you should probably wrap the "$event->catname" inside a htmlspecialchars call too but I don't know for sure and the above worked for me so...)


Works like a charm! Many, many many thanks!
 
Logged Logged
  The administrator has disabled public write access.
#1143
admin
Platinum Boarder
Posts: 677
graphgraph
User Offline
Re:Tooltip: Category after description 10 Years, 9 Months ago Karma: 14
This feature is now in the latest version (0.9) or the calendar just out (30/12/08)

You can now show the category and/or the venue in the tooltips

Regards
Toni
 
Logged Logged
  The administrator has disabled public write access.
#1149
bole
Fresh Boarder
Posts: 11
graphgraph
User Offline
Re:Tooltip: Category after description 10 Years, 9 Months ago Karma: 0
Excellent, thanks!
 
Logged Logged
  The administrator has disabled public write access.
Go to top
Drug Amoxil Online (Amoxicillin) is used to treat many different types of infections caused by bacteria, such as ear infections, bladder infections, pneumonia, gonorrhea, and E. coli or salmonella infection. Sleeping pills: l-tryptophan, Phenergan, Unisom, Sominex - currently the most popular are the following hypnotic drugs. Click to see full text here:
Italian online pharmacy. Cialis, Viagra and other generic drugs. The best price and free shipping.
Sponsored by: sominex online shop.