1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Wordpress Widget, last x xenForo Topics to WordPress widget area(s).

Discussion in 'Add-on Releases [Archive]' started by Jethro, Jan 13, 2011.

  1. Jethro

    Jethro Well-Known Member

    Requirement, Wordpress 3.0.x, xenForo (else it will look really silly), an ftp tool.

    What it does: Basically via your WP Dashboard you can select how many topic titles to display in a block on your Wordpress Blog. The widget provides a link to the actual individual topics.

    New version posted 24 Jan 2011


    - Some minor things fixed up
    - Ability to exclude Private forums from the Settings option in the WP Dashboard, thanks Rob and Mike for explaining how the db hangs together.
    - gotski additional topic title manipulation added.
    - Full install instructions now included in the zip.

    Example www.xenique.com

    Attached Files:

    eod, Andy.N, Vodkaholic and 11 others like this.
  2. Crazyfruitbat

    Crazyfruitbat Well-Known Member

    I'll be using this tonight for sure, will let you know how I get on. Many thanks for the mod!
  3. Jethro

    Jethro Well-Known Member

    Thanks dude, has worked on a few test installs with differing setups but fingers crossed no issues.
    laztrix likes this.
  4. Robert F Schmitz

    Robert F Schmitz Well-Known Member

    Warning: include(./forum/library/config.php) [function.include]: failed to open stream: No such file or directory in /home/content/99/7000799/html/wp/wp-content/plugins/xenLastPosts/xenlastposts.php on line 85
    Warning: include() [function.include]: Failed opening './forum/library/config.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/99/7000799/html/wp/wp-content/plugins/xenLastPosts/xenlastposts.php on line 85
    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/99/7000799/html/wp/wp-content/plugins/xenLastPosts/xenlastposts.php on line 94
    MySQL Connect : 
    This is what I am getting.

    See here http://myfoxhunter.com/
  5. Andy.N

    Andy.N Well-Known Member

    Would be nice to be able to call it directly on custom page template instead of using widget.
    How much load will this add to wp pages and post?
  6. Jethro

    Jethro Well-Known Member

    Rob in the settings option what have you entered for the Xen Directory? Looks to me like you might have to enter "./forum/" the dot before the forward slash may fix your problem.
    Rob Fritz likes this.
  7. Jethro

    Jethro Well-Known Member

    Zero load to a Xen post as the widget operates outside of xenForo.

    Sorry developed this one as a direct requirement for something we were working on and thought I might share it with the general community.
    Rob Fritz likes this.
  8. CyberAP

    CyberAP Well-Known Member

    Can you add an option to set custom title in the widgets section? Because now wordpress doesn't recognise widget title so we don't get any styling.
  9. Kim

    Kim Well-Known Member

    Hi there, the widget-title is a standard class of the twentyten theme, if you are using another theme you will have to add the CSS yourself.

    .widget-title {
        color: #222;
        font-weight: bold;
    Here is an example of it working on the base Twentyten theme....

  10. Booth

    Booth Well-Known Member

    This is great, but unfortunately doesn't fit in with my theme - take a look here, www.pleasedsheep.com

    Any ideas for how to make it look like the other widgets?
  11. Robert F Schmitz

    Robert F Schmitz Well-Known Member

    That was it. Great idea Jethro. Thanks for this.
  12. Robert F Schmitz

    Robert F Schmitz Well-Known Member

    Quick question Jethro. Is there a way to exclude private forums?
  13. Shaun Mason

    Shaun Mason Active Member

    I agree.

    I would also like to see it work with subdomains.
  14. Jethro

    Jethro Well-Known Member

    Knew I overlooked something, will work on it today to allow exclusion.
    Rob Fritz likes this.
  15. Booth

    Booth Well-Known Member

    How do you alter css/look of the widget?
  16. gotski

    gotski Member

    Jethro, big thx for your WP mod. I have problem with my urls if title thread includes '. And I've added
    $url_title = str_replace('!', '', $url_title);
    $url_title = str_replace('\'', '', $url_title);
  17. Kim

    Kim Well-Known Member

    Your theme doesn't use the standard Twenty Ten theme classes, it uses slightly different ones.. you can do two different things to make them the same.

    1. Change the Classes in Jeff's Mod to those in your theme...

    Open up your WP ACP and click on plug ins - Xenforo Latest Topics- and click on the "edit" button to open the PHP file.

    In there you will find a section that has the HTML output, you can carefully change the classes to the relevant classes of your theme.

    Your theme author has used the following classes instead..


    So they would look like this...

        echo '<li id="archives" class="widget widget_recent_comments">';
        echo '<h3 class="widget_title">'.$xentitle.'</h3>';
    Then save.

    This should work, however I can't test it of course, so it will be TRIAL AND ERROR - make sure you take a backup of the PHP file before you begin.


    There is another method you could try...

    2. Create the CSS classes used in Jeff's mod..

    Open up your WP theme's style.css file, and find the class for the widget header.


    Copy and paste underneath in the same CSS sheet.

    Rename the copied version to widget-title

    h2.widget_title ----------------- becomes---------------------- widget-title (note hyphen not underscore)


    Then create


    using the same details as the others in the column...

    .widget-container ul li {
    	border-bottom:1px dotted #D3D9EB;
    	padding:2px 0 2px 10px;
    	background:url(red/ico_widget_li.gif) no-repeat left 7px;
    You can also just piggy back the new classes into the old...


    .widget ul li,
    .widget-container ul li {
        border-bottom:1px dotted #D3D9EB;
        padding:2px 0 2px 10px;
        background:url(red/ico_widget_li.gif) no-repeat left 7px;
    h3.widget-title {
    	margin:4px 0;
    Whilst not perfectly elegant, any of the above should work to give you the same as the other widget boxes in your existing theme.
    Jethro, Booth and Andy.N like this.
  18. Jethro

    Jethro Well-Known Member

    Should have a new version up later today or early tomorrow that incorporates excluding Private forums, thanks Mike, and gotski's additional title fixes :) Just finishing off the CSS for the documentation, oh yes there will be pictures kids
    Andy.N likes this.
  19. Jethro

    Jethro Well-Known Member

    Updated with latest release, see first post in thread.

    If previously installed, then simply de-activate the widget and delete. Re-install via the included readme.html file.
  20. Wuebit

    Wuebit Well-Known Member

    anyway to get this to work with subdomains ?

Share This Page