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.


Info on sidebar

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#63998 (In Topic #13807)
Avatar

Fan in action

Where can I find some info on how to put items in the right sidebar?
I have a small piece of javascript that I want to place in the right sidebar just below the calendar and the site statistics.

Thanks
Back to the top
 
Posted
Rating:
#64000
Avatar

Community saint

Hi columbo,

The page can be edited here: Admin Zone->Content->Comcode pages

site:panel_right

disable WYSIWYG editing and enter your code between the block in question similar to this:

Code

[block="month" zone="_SEARCH" days="30"]side_calendar[/block]
[semihtml]
<script type="text/javascript">
(your script here);
</script>
[/semihtml]
Back to the top
 
Posted
Rating:
#64003
Avatar

Community saint

columbo said

I have a small piece of javascript that I want to place in the right sidebar …

Is the JavaScript going to display something, or is it a hidden piece of code?

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#64004
Avatar

Fan in action

Thanks Jean.

Fletch, to answer your question,… it is going to display something.
Back to the top
 
Posted
Rating:
#64005
Avatar

Fan in action

Tried your code Jean but it wouldn't work. Doesn't seem to like the semihtml tags. Wouldn't accept them. I changed them to straight html tags and it took them without flagging an error but it didn't display anything in the right column. Now when I go back to edit the site:panel_right there is no code visible, not even the code for the calendar or the ite statistics block that was there previously, although the calendar and site statistics still seem to display in the right column anyway.

Any other suggestions?
Back to the top
 
Posted
Rating:
#64010
Avatar

Probably would be best if you could record a quick jing screencast to show what you mean.


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:
#64013
Avatar

Community saint

columbo said

Any other suggestions?

  • Use the 'Edit in zone editor' link at the bottom of the panel. At least it will reassure you that your code for the calendar and other modules is still there if you see it.
  • Try to insert Jean's suggestion in the 'Edit' window

I suspect you will need to build a 'custom' box around the JS you are trying to insert so that it blends seamlessly into the panel. I have an example, but will wait until you have tried it your way.

Took a look at your 'page source'. See the attachment:



Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#64020
Avatar

Fan in action

Ok, I got it now. My stupid mistake. I forgot to turn off the WYSIWYG editor first. I switched it off, cleared everything and then re-entered the code and it worked ok.

Thanks for all the help.
Back to the top
 
Posted
Rating:
#64022
Avatar

Community saint

Glad to hear you got it, columbo!;)
Good work! It looks fantastic:thumbs:
I've got to ask you about that script, if you'd like to share it?

Cheers,
Jean
Back to the top
 
Posted
Rating:
#64023
Avatar

Community saint

Good work.

Jean really is 'Mr. Nice Guy' and far toooooo polite. I've already stolen the script. Thanks!

You know what they say about "imitation being the sincerest form of flattery."

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#64025
Avatar

Community saint

Fletch said

Jean really is 'Mr. Nice Guy' and far toooooo polite. I've already stolen the script. Thanks!

 :lol: - I'm at fault too… already took it as well!


Site is coming along just nicely, columbo!  :thumbs:

Eric DeMars . com
My electronic portfolio and personal site. Uses ocPortal!
Back to the top
 
Posted
Rating:
#64030
Avatar

Fan in action

Looks good on your site Fletch. I thought mine looked a bit wide in the right panel, but sure, you can pt me the code.

Jean, just click on the button at the lower right of the globe and it'll take you to the site where you can get it. It is a neat script eh?

Thanks for the compliment Eric. Still work to do but its coming. I need to get more familiar with ocPortal but I am getting lots of help, especially from Fletch. He is a guy with a lot of patience with newbies. :)
Back to the top
 
Posted
Rating:
#64039
Avatar

Community saint

columbo said

Looks good on your site Fletch. I thought mine looked a bit wide in the right panel, but sure, you can pt me the code.

I need to get more familiar with ocPortal but I am getting lots of help, especially from Fletch …

 :$  Shucks!  :$

PT on its way …

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#64054
Avatar

Fan in action

Hi Fletch,

Thanks for the code. Everything worked seamlessly with no problems. Mine still looks a bit wide thought. There is about 5 pixels padding on the left side of the box but it runs past the edge of the box on the right side. I wonder if I should try to shorten the width of the center column by a few pixels and widen the sidebars a bit?
Back to the top
 
Posted
Rating:
#64056
Avatar

Community saint

I was looking at it while you were posting this, so I did a bit of fiddling with Firebug. Try replacing your JS code with this this. Leave the wrapper AS-IS  …

Code

<script type="text/javascript" src="http://jd.revolvermaps.com/r.js"></script><script type="text/javascript">rm_f1st('1','166','false','true','d4e0f1','3ump0d2vwtq','false','ffc000');</script><noscript><applet codebase="http://rd.revolvermaps.com/j" code="core.RE" width="166" height="166" archive="g.jar"><param name="cabbase" value="g.cab" /><param name="r" value="false" /><param name="n" value="true" /><param name="i" value="3ump0d2vwtq" /><param name="m" value="1" /><param name="s" value="166" /><param name="c" value="ffc000" /><param name="v" value="false" /><param name="b" value="d4e0f1" /><param name="rfc" value="true" /></applet></noscript>

 :thumbs:


Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#64057
Avatar

Fan in action

Nope! Makes the globe huge and you can only see the top left portion of the globe rotating by. Actually I had already tried reducing the size params from 182 to 175 and got the same result.
Back to the top
 
Posted
Rating:
#64058
Avatar

Fan in action

Hi Terry,

I widened the sidebars a bit and it looks better now. Take a peek.
Back to the top
 
Posted
Rating:
#64062
Avatar

Community saint

Woooo-bloody-hooooo! (pardon my french!)

I take it you are happy with that background colour? You could change it to the pale blue of your panel, but I leave that up to you. It actually looks pretty good as-is.

And you've managed to 'integrate' (abutt) it to the other boxes so that it looks like a seamless part of 'panel-right'.

Good work.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#64065
Avatar

Fan in action

Yes, the color works with the rest of the site. I'm happy with that. I guess the site doesn't look too bad with the sidebars a little bit wider. Funny how making the width smaller in the script actually makes the globe really large. I wish it didn't have all of those silver buttons on it though.

Thanks again for the code Fletch.
Back to the top
 
Posted
Rating:
#64066
Avatar

Community saint

columbo said

I guess the site doesn't look too bad with the sidebars a little bit wider. Funny how making the width smaller in the script actually makes the globe really large. I wish it didn't have all of those silver buttons on it though.

Thanks again for the code Fletch.

Increasing the sidebar width is fine when using the flexible template. There is a lot of real-estate to fill, and the sidebars don't intrude as much as they do on a fixed display.

The silver buttons are a pain, but that's the price you pay for using somebody elese's code. You could copy and mirror their JS on your own site and reference it (cheating, I know), and then you could adjust the size and position of those buttons, or remove them altogether.

For me, they work OK - for now. I don't think I will be re-writing their JS, and as long as I use the feature, I intend to give them the credit for a very neatly put together widget, because that's all it is!

Keep experimenting - and sharing - and we can all be the richer for it.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Expand