• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!


Adding a Custom or New Section

Page history last edited by PBworks 13 years, 9 months ago

This documentation is for version 1 & 2 of Mobile Web OSP.


Adding a custom/new section to Mobile Web OSP is essentially as easy as copying another section that already exists. Almost... There are three little tricks to be aware of and I hope to address this issue in a future release of the product. In order for statistics to be properly recorded for your new section you will need to do the following.


Modify Your Database

You need to make sure that their is a column that has the same name as the folder that contains your new module. For example, if you're adding a new module with the directory of 'twitter' (e.g. someone would access it by going to http://m.inst.edu/twitter/) you need to make sure their is a column in the Pageviews table called 'twitter.' 


Modify counter.php

You'll also need to add the directory, in this example 'twitter,' to the $fields array on line #19 in 'web/page_builder/counter.php'. Counter.php is the bit of code that records the internal statistics.


Modify statistics.php

If you plan on referring to the internal statistics, which for page views will always be the most accurate source, you will need to make sure your new section will show up in the report. To do so add your new section, 'twitter,' to the $urls array on line #71 of 'web/mobile-about/statistics.php'.



That should be it. Creating a custom section can be really quick and is definitely one of the great things about mobile web. Within an hour or so you can have an entirely new section added to your site ready for everyone to use and you didn't have to wait on someone else to approve it.


Comments (0)

You don't have permission to comment on this page.