[Xerte-dev] Re: Workspace Icons

Pat L (pgogy) xerte at pgogywebstuff.com
Tue Jan 7 11:00:22 GMT 2014


shouldn't it do

if(file_exists(icon){

}else{

}


On Tue, Jan 7, 2014 at 10:24 AM, Smith, John <J.J.Smith at gcu.ac.uk> wrote:

>  Try changing line 229 from
>
>
>
> echo "<div id=\"file_" . $row['template_id'] .  "\" class=\"file\"
> preview_size=\"" .
> $xerte_toolkits_site->learning_objects->{$row['template_framework'] . "_" .
> $row['template_name']}->preview_size . "\" editor_size=\"" .
> $xerte_toolkits_site->learning_objects->{$row['template_framework'] . "_" .
> $row['template_name']}->editor_size . "\" style=\"padding-left:" .
> ($level*10) . "px\"
> onmousedown=\"single_click(this);file_folder_click_pause(event)\"
> onmouseup=\"file_drag_stop(event,this)\"><img
> src=\"{$xerte_toolkits_site->site_url}/website_code/images/Icon_Page_".strtolower($row['template_name']).".gif\"
> style=\"vertical-align:middle;padding-right:5px\" />" . str_replace("_", "
> ", $row['project_name']) . "</div>";
>
>
>
> to
>
>
>
> echo "<div id=\"file_" . $row['template_id'] .  "\" class=\"file\"
> preview_size=\"" .
> $xerte_toolkits_site->learning_objects->{$row['template_framework'] . "_" .
> $row['template_name']}->preview_size . "\" editor_size=\"" .
> $xerte_toolkits_site->learning_objects->{$row['template_framework'] . "_" .
> $row['template_name']}->editor_size . "\" style=\"padding-left:" .
> ($level*10) . "px\"
> onmousedown=\"single_click(this);file_folder_click_pause(event)\"
> onmouseup=\"file_drag_stop(event,this)\"><img
> src=\"{$xerte_toolkits_site->site_url}/website_code/images/";
>
>
>
> if (strtolower($row['template_name']) == “Nottingham” ||
> strtolower($row['template_name']) = “site” etc etc)
>
>   echo "Icon_Page_".strtolower($row['template_name']). ".gif";
>
> else
>
>   echo "Icon_Page_default.gif";
>
>
>
> echo "\" style=\"vertical-align:middle;padding-right:5px\" />" .
> str_replace("_", " ", $row['project_name']) . "</div>";
>
>
>
>
>
> Regards,
>
>
>
> John Smith
>
> Learning Technologist
>
> School of Health & Life Sciences
>
> Glasgow Caledonian University
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [mailto:
> xerte-dev-bounces at lists.nottingham.ac.uk] *On Behalf Of *Julian Tenney
> *Sent:* Tuesday, January 07, 2014 10:12 AM
>
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: Workspace Icons
>
>
>
> No, I think you have code that says
>
>
>
> If (nottingham){
>
>   //show nottingham icon
>
> } else if (bootstrap){
>
>   //show bootstrap icon
>
> }
>
>
>
> It needs a final else to catch templates that are not caught by the ifs:
>
>
>
> If (nottingham){
>
>   //show nottingham icon
>
> } else if (bootstrap){
>
>   //show bootstrap icon
>
> } *else {*
>
> *  //show default*
>
> *}*
>
>
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Smith, John
> *Sent:* 07 January 2014 10:03
> *To:* For Xerte technical developers
> *Subject:* [Xerte-dev] Re: Workspace Icons
>
>
>
> What template do they use? The Bootstrap one? You should be able to right
> click next to it and Inspect Element in Chrome and the icon should be named
> Icon_Page_TEMPLATENAME.gif
>
>
>
> The icon might be missing or its one of the older templates…
>
>
>
> It’s here anyway…
> https://github.com/thexerteproject/xerteonlinetoolkits/commit/e3e9cc68693725f97aa14be365dc6f35a08e27f0#diff-31e49d53a5d6a104d34be2f564795223L229
>
>
>
> Regards,
>
>
>
> John Smith
>
> Learning Technologist
>
> School of Health & Life Sciences
>
> Glasgow Caledonian University
>
>
>
> *From:* xerte-dev-bounces at lists.nottingham.ac.uk [
> mailto:xerte-dev-bounces at lists.nottingham.ac.uk<xerte-dev-bounces at lists.nottingham.ac.uk>]
> *On Behalf Of *Julian Tenney
> *Sent:* Tuesday, January 07, 2014 9:53 AM
> *To:* For Xerte technical developers (xerte-dev at lists.nottingham.ac.uk)
> *Subject:* [Xerte-dev] Workspace Icons
>
>
>
> Hi guys,
>
>
>
> Just updated to 2.1, no problems at all, thanks.
>
>
>
> One thing: where is the code that decides which icon to display in the
> workspace? It needs an
>
>
>
> } else { //do default icon
>
>
>
> otherwise no icon shows up…
>
>
>
>
> Glasgow Caledonian University is a registered Scottish charity, number
> SC021474
>
> Winner: Times Higher Education’s Widening Participation Initiative of the
> Year 2009 and Herald Society’s Education Initiative of the Year 2009.
>
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
>
> Winner: Times Higher Education’s Outstanding Support for Early Career
> Researchers of the Year 2010, GCU as a lead with Universities Scotland
> partners.
>
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
>
> Glasgow Caledonian University is a registered Scottish charity, number
> SC021474
>
> Winner: Times Higher Education’s Widening Participation Initiative of the
> Year 2009 and Herald Society’s Education Initiative of the Year 2009.
>
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
>
> Winner: Times Higher Education’s Outstanding Support for Early Career
> Researchers of the Year 2010, GCU as a lead with Universities Scotland
> partners.
>
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
>
> _______________________________________________
> Xerte-dev mailing list
> Xerte-dev at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20140107/0f525032/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 113008 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20140107/0f525032/attachment-0001.png>


More information about the Xerte-dev mailing list