HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Fun with bookmarklets

Login / Search

 [ Join | More ]
 
Posted
Rating:
#42304 (In Topic #9444)
Avatar

Bookmarklets are normal browser bookmarks that happen to have Javascript URLs instead of normal ones. When clicked they can interact with the page you're viewing, and this do some interesting things. Here are 5 really handy ones that speed up developing/debugging an ocPortal site. They're all tested on Firefox 3, but should work on most browsers (except the last one). As they all do administrative stuff, you'll need to have an active login on your website for them to work (and you need to be on the website when you activate the bookmarklet).

New window of current screen, but view as 'test' user:

Code

javascript:void(window.open(window.location+((window.location.href.indexOf('?')==-1)?'?':'&')+'keep_su=test'));

New window of current screen, but with caches disabled:

Code

javascript:void(window.open(window.location+((window.location.href.indexOf('?')==-1)?'?':'&')+'keep_cache=0'));

New window showing templates/CSS used to build the current screen:

Code

javascript:void(window.open(window.location+((window.location.href.indexOf('?')==-1)?'?':'&')+'special_page_type=tree'));

New window allowing editing of language strings used to build the current screen:

Code

javascript:void(window.open(window.location+((window.location.href.indexOf('?')==-1)?'?':'&')+'special_page_type=lang'));

New window with FirePHP enabled (requires Firefox+Firebug+FirePHP). Will result in all queries and permission checks being logged to the FireBug console.

Code

javascript:void(window.open(window.location+((window.location.href.indexOf('?')==-1)?'?':'&')+'keep_firephp=1'));

To set them up, just add a normal bookmark/favorite and use the URLs I've written. I made them as bookmarks on my toolbar.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42312
Avatar

Community saint

How do you use these?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#42313
Avatar

  1. Copy one of the URLs above into the clipboard.
  2. Right-click on the bookmark toolbar.
  3. Choose 'New bookmark'
  4. Type in any 'Name' you like
  5. Paste into 'Location'
  6. Click 'Add'
  7. Browse to your ocPortal site and log in as admin
  8. Click the bookmark you added to your toolbar


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42314
Avatar

Community saint

oh ok cuz I was trying to copy the javascript behind the url and it just gave me a 404. I also added to normal book marks but that did not work.
 
That works much better.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#42316
Avatar

Community saint

I do apologize for not fully understanding and thanks very much as this is very neat.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: