1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trying to integrate Jquery-socialist in a custom page, need small help

Discussion in 'General Troubleshooting' started by nothingman, May 14, 2013.

  1. nothingman

    nothingman Active Member

    I'm trying to get Jquery-socialist load on a custom page but the feeds just refuse to load up as it is in the demo link. Any idea where I'm going wrong?

    Here's the code to the custom php file.

    PHP:
    <html>
    <
    head>
    <
    link href="http://mysite.com/content/themes/default/jquery.socialist.css" rel="stylesheet" />
    <
    script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
    <script src='http://mysite.com/content/themes/default/jquery.socialist.js'></script>
    <script type="text/javascript">
    $(document).ready(function () {
        $('#content').socialist({
            networks: [
                     {name:'linkedin',id:'buddy-media'},
                    {name:'facebook',id:'in1dotcom'},
                  {name:'pinterest',id:'potterybarn'},
                    {name:'twitter',id:'mizohican'},
                    {name:'googleplus',id:'105588557807820541973/posts'},
                  {name:'rss',id:' http:feeds.feedburner.com/good/lbvp'},
                    {name:'rss',id:'http:www.makebetterwebsites.com/feed/'},
                  {name:'craigslist',id:'boo',areaName:'southcoast'},
                    {name:'rss',id:'https:news.google.com/news/feeds?hl=en&gl=in&q=mizoram&um=1&ie=UTF-8&output=rss'}
               ],
            isotope:false,
            random:false,
            fields:['source','heading','text','date','image','followers','likes']
        });
    });
    </script>
    </head>
    <body>
        <div id="content"></div>
    </body>
    </html>
     
    Last edited: May 14, 2013
  2. narc

    narc Well-Known Member

    I would write my own plugin for it. there you can precisely control the output. and do not work on the template level. looking in the best of the docu hotaru pure.

    learn php is beneficial. individual wishes and solutions always cost time and money.
     
    shibuya246 likes this.
  3. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    can you show me the link to your page so i can see what it looks like and then i can compare it with the demo

    A few thoughts are, jquery is included now automatically with Hotaru CMS 1.5.0
    you may not need the head/body tags if its inside a base hotaru setup since you should have the header/footer
    You may need to call jQuery('document') instead of $(document)
     
  4. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    I got it working roughly here

    http://ipadrank.com/index.php?page=social

    Here is the code I edited from yours

    Code:
    <link href="http://ipadrank.com/content/themes/default/socialist/jquery.socialist.css" rel="stylesheet" />
    <script src='http://ipadrank.com/content/themes/default/socialist/jquery.socialist.min.js'></script>
    <script type="text/javascript">
    jQuery('document').ready(function () {
        $('#content').socialist({
            networks: [
                     {name:'linkedin',id:'buddy-media'},
                    {name:'facebook',id:'in1dotcom'},
                  {name:'pinterest',id:'potterybarn'},
                    {name:'twitter',id:'mizohican'},
                    {name:'googleplus',id:'105588557807820541973/posts'},
                  {name:'rss',id:' http:feeds.feedburner.com/good/lbvp'},
                    {name:'rss',id:'http:www.makebetterwebsites.com/feed/'},
                  {name:'craigslist',id:'boo',areaName:'southcoast'},
                    {name:'rss',id:'https:news.google.com/news/feeds?hl=en&gl=in&q=mizoram&um=1&ie=UTF-8&output=rss'}
               ],
            isotope:false,
            random:false,
            fields:['source','heading','text','date','image','followers','likes']
        });
    });
    </script>
    
        <div id="content"></div>
     
    make sure you copy the .js and .css file into a folder in your theme. I would imagine a plugin for placing those files would work better
     
  5. nothingman

    nothingman Active Member

    Here's the link: http://lawrkhawm.com/index.php?page=jquery_socialist

    I agree but I'm just not your 'coder' types - -one of those who struggle with math :) Also, I tested the above code in a simple HTML page, the feeds loaded very well.
     
  6. nothingman

    nothingman Active Member

    Thanks Shibuya. Did you hide the sidebar by any chance? I've tried it out but it happens to load forever and after a while a blank page shows up - link here.
     
  7. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    I found the non min version of the css worked better, but the styling looks to be way off. I would have to try it on a blank page and compare, but first I have to finish up v.1.5.0 ;)
     
    nothingman likes this.
  8. nothingman

    nothingman Active Member

    Agreed ;)

    To be frank, this is not high priority. Was just stuck that's all - will play around and see if I can get this sorted out.
     
  9. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    thats ok. it is nice to see what people are experimenting with
     

Share This Page