Hi,Is there a way to pre-select a help topic using a parameter in URL?This way, we can provide direct links to a given help topic. Makes it much easier for setups where there are many help topics to choose from.Thanks!

Unfortunately this is currently not possible.If you want it, you need to mod your osTicket installation yourself.

3 months later

one way to do it.find the file /include/client/open.inc.phparound line 50 you will find this bit of code                    foreach($topics as $id =>$name) {                        echo sprintf('<option value="%d" %s>%s</option>',                               $id, ($info==$id)?'selected="selected"':'', $name);                    }replace with the following/* Modification Start * preselect help topic * add ?ht= to open.php * eg. open.php?helptopic=2 */                    if(isset($_GET) && $_GET > 0 ){                        foreach($topics as $id =>$name) {                            echo sprintf('<option value="%d" %s>%s</option>',                                    $id, ($_GET==$id)?'selected="selected"':'', $name);                        }                    } else {                        foreach($topics as $id =>$name) {                            echo sprintf('<option value="%d" %s>%s</option>',                                    $id, ($info==$id)?'selected="selected"':'', $name);                        }                    }/* Modification End */your default help topic will still work.to find topic idAgent Panel > Manage > Help Topicswhen you click on a help topic you will see the id in the url bar/scp/helptopics.php?id=2hope it helps

for got add the link format /open.php?ht=2thats it

I've moved this thread to the Mods and Customizations section of the forums.

2 years later

Hi,Many thanks for this (appreciate this thread is nearly two years old, but still relenvent to solution). It suited exactly what I needed as well. I did find I need to add the following code to top of open_inc.php - whilst the code above changed the help topic select field, it did not actually make the custom form update. The code below makes it do this, Hope this helps..<?phpif( $_GET){ $ht = $_GET;echo "<script type='text/javascript'>$( document ).ready(function() {";echo "var data = $('', '#dynamic-form').serialize();                            $.ajax(                              'ajax.php/form/help-topic/' + $ht,                              {                                data: data,                                dataType: 'json',                                success: function(json) {                                  $('#dynamic-form').empty().append(json.html);                                  $(document.head).append(json.media);                                  }                              })";echo "});</script>";}?>regards,

5 days later

@[deleted]Could you please provide some screenshots?I think it's what I'm looking for but I'm not sure.

3 years later
Write a Reply...