Jump to content

How is this site doing the Memorial Day thing at the top?

Featured Replies

Posted

Probably a stupid question... but is that part of the suite, plug-in or something custom they did?

Thanks

JM

This option should be a available for announcements. 

  • Author

I agree, it's striking and can't be missed.

One line of text and pick the color of text & background.

Oh and just for the hell of it,  the ability to make it blink in different colors for specific members groups or users just to bug the hell out of them.

open global template

before: 

 

<div id='ipsLayout_header' class='ipsClearfix'>
 
add:
<div id="top_message">this is a test message.</div>
you then add this to custom css
#top_message{background:#f5ceaf;padding:10px;font-size:14px;color:#573418;text-align:center;}

open global template

before: 

 

<div id='ipsLayout_header' class='ipsClearfix'>
 
add:
<div id="top_message">this is a test message.</div>
you then add this to custom css
#top_message{background:#f5ceaf;padding:10px;font-size:14px;color:#573418;text-align:center;}

​Will this add a section in the admin CP where you can turn it off and on? Or will this have to be edited each time? 

​Will this add a section in the admin CP where you can turn it off and on? Or will this have to be edited each time? 

​edited each time, you could also use font awesome to add a pre icon to message

like..

<div id="top_message"><i class="fa fa-lightbulb-o"></i> this is a test message.</div>

this adding a lightbulb to front of message

you can find more font awesome icons to use at http://fortawesome.github.io/Font-Awesome/icons/#new

Thank you, I moved from Vbuleltin and have been out of forums for maybe about 5 years so I'm re-learning all of this again. 

Install topmessage.xml as plugin and njoy:)

 

http://screencast.com/t/uW4ou0niQ

 

 

Howto for plugin coders:

 

  1. Create plugin
  2. Create a setting to save the text (plugin devcenter => settings tab). I'm using daniel_topmessage as name. Try to use something unique!
  3. Rename settings file from settings.example.php to settings.php and create your settings form
    //<?php
    
    $form->add( new \IPS\Helpers\Form\Editor( 'daniel_topmessage', \IPS\Settings::i()->daniel_topmessage, FALSE, array( 'app' => 'core', 'key' => 'Admin', 'autoSaveKey' => 'daniel_topmessage') ) );
    
    if ( $values = $form->values() )
    {
    	$form->saveAsSettings();
    	return TRUE;
    }
    
    return $form;
  4. Create theme hook for the globalTemplate and add your custom code to top of the body 
     
    {{if \IPS\Settings::i()->daniel_topmessage != ''}}
    <div id='top_message'>{{ $var = \IPS\Settings::i()->daniel_topmessage; }}{$var|raw}</div>
    {{endif}}
  5. create a css file in your plugin/dev/css directory
    my code:

    #top_message {
    	background: #f5ceaf;
    	padding: 10px;
    	font-size: 14px;
    	color: #573418;
    	text-align: center;
    }
    
    #top_message :first-child  {
    	margin-top: 0 !important;
    	margin-left: 0 !important;
    	margin-bottom: 0 !important;
    }

    The first-child part isn't really necessary, but it's just a quick unofficial plugin, so i didn't want to spend too much time with this...
    The problem is, that the editor is saving the text in an paragraph, that's why I'm using the :first-child selector to remove the margin.. :D

enjoy your cool plugin

@Daniel F why not make this plugin to the Marketplace? 

why not make this for v3.4.6? This was showing before v4, too...!

  • 6 months later...

I been editing the CSS, and I thought about adding fa fa-warning 

On 5/23/2015, 2:44:22, Daniel F said:

Install topmessage.xml as plugin and njoy:)

enjoy your cool plugin

Thank you!!!

This needs to be stock.  It is a fantastic add on.

17 hours ago, EmpireKickAss said:

I been editing the CSS, and I thought about adding fa fa-warning 

well

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.