Digital Point Social Bar

Digital Point Social Bar 1.0.2

No permission to download

digitalpoint

Well-known member
If you open up the DigitalPointSocialBar/Callback/SocialBar.php file and change this method (first one in the file):

PHP:
    public static function renderTwitterSlugList($contents, $params, $template)
    {
        $slugs = array('' => '(' . new XenForo_Phrase('none') . ')') +
            XenForo_Model::create('DigitalPointSocialBar_Model_SocialBar')->getSlugsFromList();

        return '<fieldset>' .
                XenForo_Template_Helper_Admin::selectUnit(
                    new XenForo_Phrase('twitter_list') . ':',
                    'dp_twitter_slug',
                    htmlspecialchars($template->getParam('forum')['dp_twitter_slug'], ENT_QUOTES, 'UTF-8'),
                    $slugs,
                    array('explain' => new XenForo_Phrase('explain_twitter_list', array('extra' => (XenForo_Application::getOptions()->dpTwitterUsername ? new XenForo_Phrase('explain_twitter_list_2', array('username' => XenForo_Application::getOptions()->dpTwitterUsername)) : '')))),
                    array()
                ) .
            '</fieldset>';
    }

to this:
PHP:
    public static function renderTwitterSlugList($contents, $params, $template)
    {
        $slugs = array('' => '(' . new XenForo_Phrase('none') . ')') +
            XenForo_Model::create('DigitalPointSocialBar_Model_SocialBar')->getSlugsFromList();

        $forum = $template->getParam('forum');
      
        return '<fieldset>' .
                XenForo_Template_Helper_Admin::selectUnit(
                    new XenForo_Phrase('twitter_list') . ':',
                    'dp_twitter_slug',
                    htmlspecialchars(@$forum['dp_twitter_slug'], ENT_QUOTES, 'UTF-8'),
                    $slugs,
                    array('explain' => new XenForo_Phrase('explain_twitter_list', array('extra' => (XenForo_Application::getOptions()->dpTwitterUsername ? new XenForo_Phrase('explain_twitter_list_2', array('username' => XenForo_Application::getOptions()->dpTwitterUsername)) : '')))),
                    array()
                ) .
            '</fieldset>';
    }

Does it work? I forgot about old versions of PHP. :)
 
Last edited:

digitalpoint

Well-known member
Will this work with the cache in Litespeed along with @Slavik LSxenForo cache since no cache is defined for it in the config file?
No idea what any of that is... but if you don't have a cache defined in your XenForo config.php file, then no... it will not work. Any sort of caching you have for other stuff (like your web server) is different.
 

JABRONI

Well-known member
Code:
ErrorException: Fatal Error: syntax error, unexpected '[' - library/DigitalPointSocialBar/Callback/SocialBar.php:14
Generated By: The Immortal Dreamer, A moment ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(72) "http://theforum.com/threads/a-challenge-to-the-immortal-dreamer.8364/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

BassMan

Well-known member
If you open up the DigitalPointSocialBar/Callback/SocialBar.php file and change this method (first one in the file):

PHP:
    public static function renderTwitterSlugList($contents, $params, $template)
    {
        $slugs = array('' => '(' . new XenForo_Phrase('none') . ')') +
            XenForo_Model::create('DigitalPointSocialBar_Model_SocialBar')->getSlugsFromList();

        return '<fieldset>' .
                XenForo_Template_Helper_Admin::selectUnit(
                    new XenForo_Phrase('twitter_list') . ':',
                    'dp_twitter_slug',
                    htmlspecialchars($template->getParam('forum')['dp_twitter_slug'], ENT_QUOTES, 'UTF-8'),
                    $slugs,
                    array('explain' => new XenForo_Phrase('explain_twitter_list', array('extra' => (XenForo_Application::getOptions()->dpTwitterUsername ? new XenForo_Phrase('explain_twitter_list_2', array('username' => XenForo_Application::getOptions()->dpTwitterUsername)) : '')))),
                    array()
                ) .
            '</fieldset>';
    }

to this:
PHP:
    public static function renderTwitterSlugList($contents, $params, $template)
    {
        $slugs = array('' => '(' . new XenForo_Phrase('none') . ')') +
            XenForo_Model::create('DigitalPointSocialBar_Model_SocialBar')->getSlugsFromList();

        $forum = $template->getParam('forum');
      
        return '<fieldset>' .
                XenForo_Template_Helper_Admin::selectUnit(
                    new XenForo_Phrase('twitter_list') . ':',
                    'dp_twitter_slug',
                    htmlspecialchars(@$forum['dp_twitter_slug'], ENT_QUOTES, 'UTF-8'),
                    $slugs,
                    array('explain' => new XenForo_Phrase('explain_twitter_list', array('extra' => (XenForo_Application::getOptions()->dpTwitterUsername ? new XenForo_Phrase('explain_twitter_list_2', array('username' => XenForo_Application::getOptions()->dpTwitterUsername)) : '')))),
                    array()
                ) .
            '</fieldset>';
    }
}

Does it work? I forgot about old versions of PHP. :)
Last } should be removed, then it works :)
 

JABRONI

Well-known member
I currently use the Core style by pixelExit, and the bar goes above the breadcrumb.

How exactly can I move it so it's below it?

7cf2e8eb08.jpg
 

Steve F

Well-known member
I currently use the Core style by pixelExit, and the bar goes above the breadcrumb.

How exactly can I move it so it's below it?

7cf2e8eb08.jpg

Most likely need to look at that for you. The breadcrumb on Core is outside the "Content" so it can only be resolved by changing something in the style, not the add-on.
 

Andy.N

Well-known member
On Mac OX, Chrome browser, when you hover your mouse over the bar, you will get a spinning circle
 

digitalpoint

Well-known member
On Mac OX, Chrome browser, when you hover your mouse over the bar, you will get a spinning circle
Yep... it's intentional. Just means you have paused the Twitter feed rotation when you hover over it (in case you see something interesting).
 

Coop1979

Well-known member
Pretty funny. I spent about a half hour this morning finding a good spot for the js you offer on your site. Should've just waited until after lunch and installed this :)
 

Adam Howard

Well-known member
@digitalpoint

Also is it possible to purchase a localized copy from you?
dig.png
While your site is normally stable, it was after all offline for 22 hours yesterday (2 hours short of a full day). So it would be good for peace of mind and also help for those who would rather things be local.
 

digitalpoint

Well-known member
@digitalpoint

Just for clarification. The branding removal does remove all 3 links to your site, right?

View attachment 74629
It removes the two on the right... the hover one over the buttons it does not (as explained earlier in the thread it's a totally different service that this addon just happens to use... and since it's 100% JavaScript based, it doesn't tie into the PHP code which is what would need to happen).

@digitalpoint

Also is it possible to purchase a localized copy from you?
Sorry, the Social Buttons thing is a service, not a product.

As far as eliminating both issues (branding and actual *use* of the Social Buttons), some pretty simple template edits in the social_bar template could just replace the usage of our Social Buttons service with whatever you want. For example you could just use the normal buttons from Twitter, Google and Facebook (which is exactly what we used to do ourselves).

upload_2014-5-28_13-0-24-png.74617
 

digitalpoint

Well-known member
Just FYI in case you want to know what it looks like with the brand free license, https://www.digitalpoint.com/ and http://doberman-chat.com/community/ are examples.

Technically there is a way to remove the hover thing on the Social Buttons thing, but it's not a "license", it's a premium membership benefit, although I would never expect anyone to get premium membership for that... it's just a bonus (for example they do that here: http://www.tinhte.vn/ ).
 
Top