80s toys - Atari. I still have
Home » Scripts And Tips » General scripts » Quick Edit
 This thread is closed
This script creates shortcut buttons to various xtgem editing functions

It will ONLY work on the MOBILE or TOUCH templates
In this script the value of $admin_hash is the value of blog_id in the url when editing any post from the MOBILE or TOUCH template
add the script to the bottom of _footer
You then need to uncomment the call cookie::set line and view the page once to set the cookie
then re comment out the line
You also need to be logged in to your xtgem account and have the particular site open in the editor or you will get a "not found" error
These links switch between the templates if you are on a pc do not go to the web template from a non web device

http://xtgem.com/template/confirm?t=mobile
http://xtgem.com/template/confirm?t=touch
http://xtgem.com/template/confirm?t=web

The script creates buttons to open any page in the building tool or text editor and to edit any blog post or create a new post when you have a post open
Only YOU will see the buttons as long as you do not leave the cookie line uncommented
It is styled in bootstrap 3.37

var $admin_hash=YOUR BLOG ID GOES HERE
# Admin cookie
#call cookie::set $name=admin; $val=$admin_hash; $expire=31468608

# Qedit
var $admin = call cookie::get $name=admin;$default=0
var $logged_in = <xt:is_logged_in />
if not $admin==$admin_hash or not $logged_in 
goto @end_qedit
endif
var $path=<xt:url type="path" urlencode="yes"/>
print {{<div class="btn-group btn-group-xs pull-left">
 <a class="btn btn-default " href="http://xtgem.com/creator/edit_file?file=$path" target="xtgem">Building Tool</a>
 <a class="btn btn-default " href="http://xtgem.com/filebrowser/file_edit?file=$path" target="xtgem">Text Editor</a>}}

get __xtblog_entry
if $__xtblog_entry
print {{<a class="btn btn-default " href="http://xtgem.com/blog/entry/edit?entry_id=$__xtblog_entry&blog_id=$admin_hash&file=$path" target="xtgem">Edit Post</a>
 <a class="btn btn-default " href="http://xtgem.com/blog/entry/add?blog_id=$admin_hash&type=1&file=$path" target="xtgem">New Post</a>}}
endif
print </div>
@end_qedit

Copy code
#
 
1
Home » Scripts And Tips » General scripts » Quick Edit
© graham 2018 : Please give credit for any of my code used