Resource icon

WordPress get Last Forum Posts 1.4.0

No permission to download
Thanks for the plugin. Just one thing. I am not the best at editing .php (or reading it for that matter).

Where exactly would I edit this file to incorporate another div element to appear above the latest forum posts? This div is the title of the widget I have on my sidebar, for example "Latest Forum Posts".

Code:
//building the divs here

                $html_Tbl .= "<div class='eipLPThread'>
                    " . $html_Lnk->getElement() . "
                    </div>
                    <div class='eipLPUserName'>".
                        $html_Mbr->getElement() ."
                    </div>
                    <div class='eipLPDate'>".
                        date('M d H:i',$feRow['lastpostdate']) . "
                    </div>";

This is from the cls_sidebartable.php file

edit for clarity: Specifically this div just modifies the css to separate my various widgets on the sidebar. The plugin pulls the name of the table from "Table Title" in the WP settings. I suppose I am trying to insert this div that applies the extra styling (while taking the name from the WP Get Last Forum Posts Options "Table Title" field.

This may be more of a Wordpress related question since we are working with .php here, but I wanted to give it a shot.
 
Last edited:
ET,

Would you consider making a widget to get the featured threads from Brogan's add-on?

I, and probably many others, would pay or donate toward such an addition (to this - or stand alone).
 
Hi,

Still got the problem with permalinks and the plugin. When I enable permalinks on my wordpress blog the avatars in the plugin disappears. Any solution or thoughts?

And yeah, absolutely love your plugin :) Thanks!
 
I really like this plugin and wanted to be able to use it on mine. It kept saying it could not find my config file though.

If anyone can help...

My wordpress is in /blogging
My forum is in /forums
My config for xenforo is in /forums/library/config.php

I tried many options including

./forums/library/config.php
../forums/library/config.php

And it still isn't reaching it.

For my domain I put /forums since that is what is following the primary domain for the forum portion.

Thanks in advance - I know it has been a little while since there has been a post here. :)
 
I really like this plugin and wanted to be able to use it on mine. It kept saying it could not find my config file though.

If anyone can help...

My wordpress is in /blogging
My forum is in /forums
My config for xenforo is in /forums/library/config.php

I tried many options including

./forums/library/config.php
../forums/library/config.php

And it still isn't reaching it.

For my domain I put /forums since that is what is following the primary domain for the forum portion.

Thanks in advance - I know it has been a little while since there has been a post here. :)

Use the whole path to the config file on the server. You can determine that by viewing the properties of the file. :) The two examples you posted are relative to the web root. Hope that helps!
 
I still need to find where to change the width of the column, and I would like for it to scale using percentage as opposed to a fixed pixed width. Possible?
 
Is there a problem with this? I have the file path's set the way Pygmalion said to do it and i still get...

The forum directory file:
/tunerjunkies/forum/library/config.php
could not be located.

At 09/04/2014 17.39.55 an unexpected error was generated.


Please use the back button to return to the prior page.
 
Firstly let me say that I love the plug-in! It's exactly what my Wordpress-Xenforo site needed.

I have everything working properly, but am having an issue with the timestamp shown on the last post is around 12 hours behind. I have both my Wordpress and Xenforo software time set to Eastern Australia Daylight time (UTC +11), and have my Xenforo user timezone set to the same. Where am I able to amend what timestamp is shown on the widget?
 
Hi
Sorry for delay in replying.
The answer would be I am not sure. The widget is reading the date field directly from the table. XF does have something to show times based on the user's choice.
The widget doesn't know if the person is logged in and doesn't know how to adjust the time.

If your database is set to Greenwich mean time, but want to display everything in Aussie time, in the query you would have to do a date add command to correct for the time differnce.

For example, date_add(query_date_field, INTERVAL 11 HOUR)

Currently at work, can find the specific file to update, and line number later today.
 
Update - while it works fine on the XF side - in WP (4.1 or 4.2) and using my Genesis framework it is messing up the formats of my page - when in the sidebar. It shoves the sidebar far down so that it doesn't show until way down...and also inserts the little bit of code (comment?) in the page as shown.
I had to remove it - but suspect this is an easy fix?

Easy, any idea how I can clean this up? It's in the right sidebar of a Genesis frame?

Screen Shot 2015-04-29 at 4.39.09 PM.webp
 
If the blog was on a separate server / domain then the forum, will the widget still work does anyone know?

Thanks so much,
CM
 
Update - while it works fine on the XF side - in WP (4.1 or 4.2) and using my Genesis framework it is messing up the formats of my page - when in the sidebar. It shoves the sidebar far down so that it doesn't show until way down...and also inserts the little bit of code (comment?) in the page as shown.
I had to remove it - but suspect this is an easy fix?

Easy, any idea how I can clean this up? It's in the right sidebar of a Genesis frame?

View attachment 105027


Hi, not sure if you found a solution, but it looks to me like a simple CSS fix. Look at the "padding" for the sidebars, or entry content. I had this same issue today using Genesis and News Pro. Changing the padding from 40 to 12 fixed it and allowed the secondary sidebar to show at the top.

Hope this helps!
 
Anyone getting warnings on the WP pages like these adding this?

Warning: mysql_real_escape_string(): 20 is not a valid MySQL-Link resource in /home/user/public_html/wp/wp-includes/wp-db.php on line 1094

Warning: mysql_errno(): 20 is not a valid MySQL-Link resource in
/home/user/public_html/wp/wp-includes/wp-db.php on line 1654

Warning: mysql_error(): 20 is not a valid MySQL-Link resource in
/home/user/public_html/wp/wp-includes/wp-db.php on line 1671

Warning: mysql_real_escape_string(): 20 is not a valid MySQL-Link resource in /home/user/public_html/wp/wp-includes/wp-db.php on line 1094
 
Anyone getting warnings on the WP pages like these adding this?

Nope, never seen this. But a Google search shows results, so other people encountered this error.

Someone wrote:

"I also had this problem. In examining my code I found I had an include of a script that closed the connection, so when php tried to close it again we got the error.

To solve this, just check if the connection is open before trying to close it:

instead of:

mysql_close($con);
Do this:

if( gettype($con)=="resource"){
mysql_close($con);}

=-=-=-=

You may also understand something here: https://wordpress.org/support/topic/not-a-valid-mysql-link-resource-in-wp-includeswp-dbphp

Hope this helps!

Andre
 
  • Like
Reactions: sgr
@creativeforge

Found the answer in that WP thread.

The new_link parameter wasn't specified in the mysql_connect function in the cls_runquery.php file.

Appending a "TRUE" in the parameter list has removed those warnings.

Thanks! :)
 
Back
Top Bottom