To do that you would want to modify the headers being sent. To do so you would use something like:

header('Content-Type: text/html; charset=utf-8');

I THINK (guessing here) that you would want to add that to your \include\client\header.inc.php

a month later

thanks

i used this today, thank you.

You're very welcome. :)

5 months later

Ntozier, I was looking at this and found your new updated version (http://www.tmib.net/add-client-side-open-ticket-list-osticket-18).  I was wondering how I could sort that table by priority to show the Emergency tickets at the top.  It would make it easier for user's to notice an important update such as a server being down or something similar.  What would be the easiest way to do this?Thanks!!

Ntozier, I did a lot reading up on views in MySQL and decided to create a view on the fly with all the information that I wanted and sort that view before entering the while loop that fills the table with data.  Thanks!

Yes, you could have it sort by priority, but starting with 1.8 priority is no longer stored in the ost_ticket table.  So you would need to query ost_form_entry. (internal ticket id = object_id iirc) and then use the id from that table to look up the priority from ost_form_entry_values.  there id=entry_id.  the field_id in that table is probably = 7, and the value or value_id would be the field you want to sort on.  You could do this whole thing with a fairly (imo) elaborate LEFT JOIN query or by doing multiple selects. I'm not real sure why you feel like a view would be the best thing to use in this case. Perhaps you can elaborate why you wouldn't just use a query?

I was thinking that using a view would make it easier somehow, but in all honestly, you're right.  There's no point.  Using just a query saves one query against the database which makes it just a little faster.  I also joined the ost_form_entry_values table to the ost_ticket_priority table so I could sort by the priority number instead so that it stays in proper order.  Otherwise it would sort alphabetically: Emergency, High, Low, Normal.  Thanks!!

Glad to be of assistance.  If you want to send me the changes that you made I certainly wouldn't mind adding them as "optional" customizations to the mod doc. :)

2 months later

I just wanted to update this post for the changes I made to be 1.8 compatible. I used ntozier's updated script from his website: http://www.tmib.net/add-client-side-open-ticket-list-osticket-18 and tweaked a few settings to make it display pretty much like my old version.

Please note that this should *never* be publicly exposed, we use this i-framed in an intra-net application.

Since I cant seem to post code now, here is a pastebin link:

http://pastebin.com/VSbw85QE

I have updated my version to, but haven't posted it yet. :)The new version also includes some admin panel integration as I am actually hoping to merge it with  core.

2 years later

Old topic but I'm looking for exactly this solution for the current version: We're planning to use osTicket internally and want to show all currently open tickets to (logged in and non logged in) users on the welcome landing page. I tried the solution above but it doesn't work anymore. Calling the page alone just show's "There are no tickets open at this time.".Maybe this solution is completely obsolete and implemented officially?! Unfortunately the search function here gives me tons of results searching for "show tickets landing page" or smth like that.Thanks!!

Write a Reply...