Community Forums

Community Discussions

custom banner in atutor 1.5 (rc3)


You must be signed-in to post.

AuthorSubject
 
Page: 1
vegard

Avatar for vegard
screendump.jpg

Attachment: screendump.jpg
Subject: custom banner in atutor 1.5 (rc3)Quote this post in your reply
I have now (finally) gotten around to try the custom banner workaround explained here:

atutor.ca/view/16/4780/1.html (the post above the last post)

...and it actually works great! here's what I did:

1. edited the header.tmpl.php file, and added this line within the header box (<div class="header">)

<?php @readfile(AT_CONTENT_DIR . $_SESSION['course_id'].'/banner.html'); ?>

then uploaded a file called banner.html in the file manager for that course, which contain the following code:

<div style="width: 760px; height: 42px; background: white;"><img src="http://[mysite]/atutor15rc3/banners/kart-camb.jpg"></div>

and as you can see I created a directory for banners at the root of my aTutor installation where I can put all banners for that particular installation, and I just edit the URL in the differrent banner.html files.

This was done very fast, and can probably be done in a number of smarter ways, but it works just fine, and gives a lot of flexibilty as you can add different HTML / CSS in the banner area for each course

Furter this model can be used to add even more course specific banners, e.g. to place an institution logo in the area above the course banner (where the course selector et al is)

I did also alter and remove some other things in the header.tmpl.php and edited the css file for that theme, but it doesn't really matter here. I've attached a screen dump of this if anyone want's to have a look.
Posted: 2005-07-08 07:18:56
puschell
Subject: custom banner in atutor 1.5 (rc3)Quote this post in your reply
Wow! That's goregous...how do I get the pic to stay as backgroud like that?

ech0s@hotmail.com
Posted: 2005-07-25 18:53:38
vegard

Avatar for vegard
Subject: re: custom banner in atutor 1.5 (rc3)Quote this post in your reply
It should all be explained in Gregs first post (see link in my post), and here. Basically what you do is modify the code in header.tmpl.php to include a file from a course where you want it (in this case as a bakground at the top) based on the course ID.

The file is then uploaded with the correct name in the file manager, and includes some HTML code that tells it to get a picture from a directory at the server.

..so when a file called banner.html is present in a specific course this will be included at the top. And that file specifies where to get the background picture. If the file isn't present nothing happens.
Posted: 2005-07-27 06:25:21
semmy
Subject: Re: re: custom banner in atutor 1.5 (rc3)Quote this post in your reply
i've tried adding a banner but somehow there's a kind of bug in the visual editor.
If i want to add a picture in the visual editor it will show the image, using an absolute path or relative. i added a directory banners with the picture in it but no change.But if i save it or change to the text editor extra code is added and the picture can't be found. How do i get round this?

operating system - Linux 2.4.27-grsec.2004080901-icmc
version of ATutor - 1.5.5.
versions of php - 4.3.9-1.dotdeb.3
version of mysql - 4.0.22-log
webserver & version -Apache/1.3.26
your ATutor location- www.dutchwell.nl/ATutor
Posted: 2007-11-09 05:59:50
greg

Avatar for greg
Subject: Re: re: custom banner in atutor 1.5 (rc3)Quote this post in your reply
It appears to be a bug in the visual editor. I've added it to the bug tracker for investigation.
Posted: 2007-11-09 15:55:32
 
Page: 1

You must be signed-in to post.

Related Articles