Resource icon

[bd] Widget Framework 2.6.6

No permission to download
I'm getting this rather bizarre error after the upgrade:
...

I get problems with Xen Porta:
...

Sorry for the problem. That was meant for incompatible renderers. Anyway, quick fix:

Open library/WidgetFramework/Extend/Model/Thread.php
Line 19, originally

PHP:
throw new XenForo_Exception('forum_ids has been deprecated, please use forum_id OR node_id in $conditions');

Add two "/" at the beginning of the line, make it like this

PHP:
//throw new XenForo_Exception('forum_ids has been deprecated, please use forum_id OR node_id in $conditions');

New version will come soon.
 
Can this display these widgets in a regular php page outside of XF (on the same site)?
If so, any examples of the coding?
 
If the PHP page uses XenForo's template system, probably. Otherwise I think you are out of luck.

Thanks...I've been digging for something like this....to work outside of XF templates, and it does not appear anyone has rolled it all together yet!
 
Has anyone encountered this xenporta error after installing widget framework? It only happens after I customize RecentThreads block.

An exception occurred: forum_ids has been deprecated, please use forum_id OR node_id in $conditions in /home/user/public_html/myforum.com/library/WidgetFramework/Extend/Model/Thread.php on line 19
  1. WidgetFramework_Extend_Model_Thread->prepareThreadConditions() in EWRporta/Block/RecentThreads.php at line 51
  2. EWRporta_Block_RecentThreads->getThreads() in EWRporta/Block/RecentThreads.php at line 30
  3. EWRporta_Block_RecentThreads->getBypass() in EWRporta/Model/Blocks.php at line 135
  4. EWRporta_Model_Blocks->getBlockParams() in EWRporta/ViewPublic/Custom.php at line 71
  5. EWRporta_ViewPublic_Custom->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 215
  6. XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 67
  7. XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 533
  8. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 156
  9. XenForo_FrontController->run() in /home/user/public_html/myforum.com/index.php at line 13
 
Has anyone encountered this xenporta error after installing widget framework? It only happens after I customize RecentThreads block.

An exception occurred: forum_ids has been deprecated, please use forum_id OR node_id in $conditions in /home/user/public_html/myforum.com/library/WidgetFramework/Extend/Model/Thread.php on line 19

Please download the latest version. Sorry for the problem.
 
  • Like
Reactions: DRE
Ho i include the php?

PHP:
<?php
 
//
//BACKLINKSELLER WEBSITE-CODE (ECHO) VERSION 2
//
 
$BACKLINK_SELLER['ID'] = '42xxxxxxxxx';
 
//Wenn Sie folgenden Parameter auf TRUE setzen, dann
//werden alle Fehlermeldungen ausgegeben und Sie
//können somit leichter die Fehlerursache feststellen
$BACKLINK_SELLER['DEBUG_FLAG'] = false; //TRUE (aktiviert) oder FALSE (deaktiviert)
 
//URL, die zu der Seite Ihrer Webpräsenz führt (z.B. http://www.example.com/my_page/)
//Die Defaulteinstellung muss in den meisten Fällen nicht geändert werden
$requestUri = $_SERVER['REQUEST_URI'];
if(substr($requestUri, 0, 1) == '/') {$requestUri = substr($requestUri, 1);} //remove leading slash
$requestUri = str_replace('http://www.xxxxxxxx.de/', '', $requestUri); //make sure that request uri is without domain
$BACKLINK_SELLER['PAGE_URL'] = 'http://www.xxxxxxx.de/' . $requestUri;
 
function backlinkseller($config)
{
    $request = '/channel/?id=' . $config['ID'] . '&page=' . urlencode($config['PAGE_URL']) . '&ip=' . $_SERVER['REMOTE_ADDR'];
    if($config['DEBUG_FLAG']) {$request .= '&debug=1';}
    $tld = 'de';
    @$socket = fsockopen('channel1.backlinkseller.' . $tld, 80, $errorNumber, $errorMessage, 5);
    if(!$socket)
    {
        $tld = 'com';
        @$socket = fsockopen('channel1.backlinkseller.' . $tld, 80, $errorNumber, $errorMessage, 5);
        if(!$socket) {return '<!-- UNABLE_TO_CONNECT -->';} 
    }
    $response = null;
    stream_set_timeout($socket, 5);
    fwrite($socket, 'GET ' . $request . " HTTP/1.1\r\nHost: channel1.backlinkseller." . $tld . "\r\n\r\n");
    $response = fread($socket, 1000000);
    fclose($socket);
    if(strpos($response, "\r\n\r\n") !== false) {$response = trim(substr($response, strpos($response, "\r\n\r\n")));}
    $response = str_replace(array('\"', "\\'"), array('"', "'"), $response); //remove quotes
    if(strpos($response, '<response>') === false || strpos($response, '</response>') === false) {return '<!-- INVALID_RESPONSE -->';}
    $response = str_replace(array('<response>', '</response>'), '', $response);
    return $response;
}
echo(backlinkseller($BACKLINK_SELLER));
 
?>

I have upload the php file in my root folder. But how i get that work?
 
Hi xfrocks, I'm trying to add a Facebook Like box as a widget. I went here and generated the code.

It's like this:


Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.
HTML:
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/tr_TR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Place the code for your plugin wherever you want the plugin to appear on your page.
HTML:
<div class="fb-like" data-href="http://www.site.com/" data-send="true" data-width="450" data-show-faces="true" data-font="trebuchet ms"></div>

How does the widget need to be set up?

Thanks.
 
Ho i include the php?
...

I have upload the php file in my root folder. But how i get that work?
You will need the PHP Callback renderer. You also need another file, looking like this


PHP:
class MotMann_WidgetRenderer_BackLink
{
public static function render(array $widget, $positionCode, array $params, XenForo_Template_Abstract $renderTemplateObject)
{
ob_start();
require('/path/to/your/php/file');
$contents = ob_get_clean();
 
return $contents;
}
}

You should place it in xenforo/library/MotMann/WidgetRenderer/BackLink.php

Then go add a new widget of the type PHP Callback, enter MotMann_WidgetRenderer_BackLink as the class and render as the method
 
Hi xfrocks, I'm trying to add a Facebook Like box as a widget. I went here and generated the code.

It's like this:


Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.
HTML:
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/tr_TR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Place the code for your plugin wherever you want the plugin to appear on your page.
HTML:
<div class="fb-like" data-href="http://www.site.com/" data-send="true" data-width="450" data-show-faces="true" data-font="trebuchet ms"></div>

How does the widget need to be set up?

Thanks.
It's not the best way to do this but you can paste all the code into 1 HTML widget and it should work just fine.
 
Is there a possibility in the "Status Updates" sidebar widget, that users could comment right within the widget just like in the IP.Board status update sidebar? Less clicks really drops the bar of commenting to an update.
 
Why there are no list of all possible positions such as "forum_list (index page), forum_view (forum page), thread_view, all"

I'm using XenPorta and I would like to add "New Threads" block only on the portal index, how to do this? Only way to do this now is use "position: all", but then its shown on every page...

Also I have few blocks on sidebar on the portal index. The last block is "Facebook Group". I would like to insert the New Treads -block just before the facebook block.. Any ideas?
 
Top Bottom