TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 455
  • Total: 455

Adding a custom block holder... thing - Azure Theme

Started by americangothic, March 21, 2009, 04:55:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

americangothic

I am trying to add a custom "block" to the forum right afrer the body tag starts that will contain a java script news headline scroller.
I copied code form an existing block and got it to this point:

// TEST BLOCK
   global $txt,$context,$boarddir;
{
      echo '<br />';
}
// TEST BLOCK END

I am aware that any content within that block will need to go between ' ' marks as indicated by my break tag. However, when I paste the Google generated code for my news scroller:

<!-- ++Begin Dynamic Feed Wizard Generated Code++ -->
  <!--
  // Created with a Google AJAX Search and Feed Wizard
  // http://code.google.com/apis/ajaxsearch/wizards.html
  -->

  <!--
  // The Following div element will end up holding the actual feed control.
  // You can place this anywhere on your page.
  -->
  <div id="feed-control">
    <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
  </div>

  <!-- Google Ajax Api
  -->
  <script src="http://www.google.com/jsapi?key=notsupplied-wizard"
    type="text/javascript"></script>

  <!-- Dynamic Feed Control and Stylesheet -->
  <script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css");
  </style>

  <script type="text/javascript">
    function LoadDynamicFeedControl() {
      var feeds = [
{title: 'Worldnet Daily',
url: 'http://feeds.huffingtonpost.com/huffingtonpost/raw_feed'
}];
      var options = {
        stacked : false,
        horizontal : true,
        title : ""
      }

      new GFdynamicFeedControl(feeds, 'feed-control', options);
    }
    // Load the feeds API and set the onload callback.
    google.load('feeds', '1');
    google.setOnLoadCallback(LoadDynamicFeedControl);
  </script>
<!-- ++End Dynamic Feed Control Wizard Generated Code++ -->


it breaks the site with this error:
syntax error, unexpected T_STRING, expecting ',' or ';'

I tried removing all of the extraneous comments and rem's out of the Google code but it just won't work.

What's the trick to getting custom content to show?

ZarPrime

americangothic,

The second block of code, by itself, works fine in a scriptbox, without the php code in the top code block you posted.  It's kind of wide so it would work best in something like a lower panel block (script block, not php).

ZarPrime

americangothic

Not really sure what a scriptbox is, never heard of it.

This is a block of code I am trying to get to show up within the SMF forum itself, not into any TP module or the like (I use MKPortal).
Sort of like how the Advanced Shout Box from nneonneo is done.



Ken.

Quote from: americangothic on March 21, 2009, 03:20:40 PM
Not really sure what a scriptbox is, never heard of it.

This is a block of code I am trying to get to show up within the SMF forum itself, not into any TP module or the like (I use MKPortal).
Sort of like how the Advanced Shout Box from nneonneo is done.

You will likely have better luck asking at the SMF or MKPortal forums, our code snippets are written to work in TinyPortal blocks and as a general rule we only support TinyPortal.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

ZarPrime

Oh, I see.  Well, if you used TinyPortal then you would indeed know what a scriptbox is.  I suggest you seek help on the MKPortal Forums because I kinow nothing about that.

If you ever decide to install TP, feel free to come back and seek our help here.

ZarPrime

Edit:  Hmmm, yeah, what Ken said. :P

americangothic

This has nothing to do with the portal though.

This is about adding a custom place-holder block within Azure itself.

Again, this has nothing to do with the portal whatsoever.

Renegd98

If you are indeed trying ot add this to SMF and not the uhmmm... portal then you need to ask over at SMF for help in adding this to their code.

ZarPrime

If this is for use with the Azure theme then perhaps we need to move this to the Azure board.  However, you will probably get more help about how to add it to the SMF Forum at Simple Machines, or from the person you got the code from.  All I know is that it works fine in a TinyPortal block because I tried it.  That is the best I can do to help you with this.

I assume you have already got it to work with the SMF default theme, correct?  If you haven't then you need to get it working with that first before trying to get it to work with a custom theme.

ZarPrime

americangothic

#8
This is what they're going to say:

SMF: what theme are you trying to add a block to?
Me: Azure, from TP.net.
SMF: go there for support.

And why would I want to add this to a, uhmmmm... portal, that makes no sense...

I want to add it to where the yellow line is in this pic:
(right above the shout box)

americangothic

Also, don't move this to the premium theme boards, I don't have access to them.

This website is proudly hosted on Crocweb Cloud Website Hosting.