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.


'Rollover' Buttons

Login / Search

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

Community saint

Me again...

I think that is the name (where the buttons changes when the mouse hovers over it…). Tried site search with no luck.

Is this possible in comcode??

 





Back to the top
 
Posted
Rating:
#32295
Avatar

Hi,

You can't do it directly, but you can always go down to the HTML level from within Comcode by using the Comcode 'html' or 'semihtml' tags to wrap up some HTML.

Such as:

Code

[semihtml]
<img class="blend" onmouseover="Javascript: this.firstsrc=this.getAttribute('src'); this.secondsrc='{$BASE_URL}/uploads/website_specific/img2.png'; this.setAttribute('src',this.secondsrc);" onmouseout="Javascript: this.setAttribute('src',this.firstsrc);" src="{$BASE_URL}/uploads/website_specific/img1.png" alt="My image" />
[/semihtml]

(I used 'semihtml' this time as it let me put that 'BASE_URL' bit in - 'html' only allows pure HTML)

I just wrote that off the top of my head so it might not work off-the-bat, but it's a start anyway.
I realise it's not exactly compact, but our team takes notes ;).


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

Community saint

COOL!!

Have been playing around with different code for a bit - strangely enough, none of it looked like that. Online samples I found required stuff to be put in the 'head' of the page. I shall have a try of this. (An amazing head if this came off the top…)

 





Back to the top
 
Posted
Rating:
#32297
Avatar

Community saint

lol ya his whole head is amazing well he is smart.

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

Community saint

I played and got the rollover working (it works)… and played.. and played… and it might be my own fault but I can't get the 'button' bit working. Was after a 'link' button (maybe I missed something)…

*Smiles hopefully*

Sorry Chris.

 





Back to the top
 
Posted
Rating:
#32363
Avatar

Honoured member

Code

[semihtml]
<a href="{$BASE_URL}/forum">
<img class="blend" onmouseover="Javascript: this.firstsrc=this.getAttribute('src'); this.secondsrc='{$BASE_URL}/uploads/website_specific/img2.png'; this.setAttribute('src',this.secondsrc);" onmouseout="Javascript: this.setAttribute('src',this.firstsrc);" src="{$BASE_URL}/uploads/website_specific/img1.png" alt="My image" /></a>
[/semihtml]

… creates a link to the Forum zone
Back to the top
 
Posted
Rating:
#32370
Avatar

Community saint

  Hmm… I am sure I tried that… but will try it again. Might have made a different error somewhere.. Thanks Paul.

(Yep, it works…:D)
.


Last edit: by Reggie

 





Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: