Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted May 22, 20159 yr Probably a stupid question... but is that part of the suite, plug-in or something custom they did?ThanksJM
May 22, 20159 yr 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.
May 22, 20159 yr This is probably a little more technically inclined but we have a how-to on something similar, just need to style it and target the correct template:http://community.invisionpower.com/4docs/advanced-usage/development/plugins-an-example-r72/
May 23, 20159 yr open global templatebefore: <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;}
May 23, 20159 yr open global templatebefore: <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?
May 23, 20159 yr 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 messagelike..<div id="top_message"><i class="fa fa-lightbulb-o"></i> this is a test message.</div>this adding a lightbulb to front of messageyou can find more font awesome icons to use at http://fortawesome.github.io/Font-Awesome/icons/#new
May 23, 20159 yr 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.
May 23, 20159 yr Install topmessage.xml as plugin and njoy:) http://screencast.com/t/uW4ou0niQ Howto for plugin coders: Create plugin Create a setting to save the text (plugin devcenter => settings tab). I'm using daniel_topmessage as name. Try to use something unique! 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; 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}} create a css file in your plugin/dev/css directorymy 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.. enjoy your cool plugin
December 6, 20159 yr 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.
December 7, 20159 yr 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.