1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Simple Forum Alerts In XenForo

Discussion in 'Template Modifications [Archive]' started by ShadyX, May 11, 2011.

  1. ShadyX

    ShadyX Well-Known Member

    Well i was just playing around with making alert balloons and i made some simple professional ones
    and thought i would share them here for others to use.



    Add this to the end of EXTRA.CSS

    Code:
    .alertgreen
    {
    	margin: 10px 0;
    	color: @secondaryDarker;
    	background-color: #f8fde5;
    	text-align: center;
    	padding: 5px;
    	border-radius: 5px;
    	border: solid 1px #99cc00;
    }
    
    .alertgreen a
    {
    	font-weight: bold;
    	color: #99cc00;
    }
    
    .alertblue
    {
    	margin: 10px 0;
    	color: @secondaryDarker;
    	background-color: #f5fafe;
    	text-align: center;
    	padding: 5px;
    	border-radius: 5px;
    	border: solid 1px #176093;
    }
    
    .alertblue a
    {
    	font-weight: bold;
    	color: #176093;
    }
    
    Here is the html that controls the baloons


    Green Alert

    Code:
    <p class="alertgreen">alert message</p>
    Blue Alert

    Code:
    <p class="alertblue">alert message</p>

    To add the alerts above the forum list and breadcrumb make a new template and call it forum_alerts then add your alerts inside. Save the template and open PAGE_CONTAINER and find

    Code:
    <xen:include template="ad_above_top_breadcrumb" />
    Add this code above it

    Code:
    <xen:include template="forum_alerts" />
    you should then see something like this

    [​IMG]
     
  2. darkrounge

    darkrounge Member

    This is nice, how did you add the "link" to the end of the alert message?
     
    ShadyX likes this.
  3. Vincent

    Vincent Well-Known Member

    <a href="yourlink">yourtext</a>

    Example:
    <a href="http://www.xenforo.com">XenForo</a>
     
    ShadyX and darkrounge like this.
  4. ShadyX

    ShadyX Well-Known Member

    Beat me to it ;)
     
    darkrounge, Vincent and Fuhrmann like this.
  5. Digital Doctor

    Digital Doctor Well-Known Member

    would this alert go away if I clicked the link ?
     
  6. Vincent

    Vincent Well-Known Member

    Nope, it's hardcoded ;)
     
    ShadyX likes this.
  7. ShadyX

    ShadyX Well-Known Member

    No, TBH the Notices introduced in 1.1 would be a better bet than using this. This is just simple CSS.
     
  8. Vincent

    Vincent Well-Known Member

    The code you set here in EXTRA.css can be used for the notice system :)
     
    ShadyX likes this.
  9. ShadyX

    ShadyX Well-Known Member

    Indeed it could.

    I will update my first post with styling for the notice system later on tonight, I'm a little bit wrapped up in client work atm :)
     
    Sylar, Brendon Meynell and Vincent like this.
  10. darkrounge

    darkrounge Member

    I prefer this one as it stands out on my forum.
    Unlike the 1.1 notice, that is hard to differentiate both the forum and the notice..
     

Share This Page