Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
I am unable to post a topic on the site
Avatar
Josh Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2012 - 8:26 pm

Having issues pasting the code. This looks bad, but it's the best I can do.

(Code block removed by forum admin)

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 30, 2012 - 4:43 am

OK - I removed the code after looking at it. It is nasty and totally goes against the WP coding rules. The good new is that it should be easy to fix up.

Locate the file membersonic.php in the wp plugins folder under membersonic.

Find these lines of code:

function wp_sm_get_header() {
    // load script
    wp_register_script('wp_sm_front_end_script_custom', plugins_url('/js/jquery-ui-1.7.3.custom.min.js', __FILE__), SM_VERSION);
    wp_enqueue_script('jquery');
    //wp_deregister_script('jquery-ui-core', 'jquery-ui-dialog');
    wp_enqueue_script('wp_sm_front_end_script_custom');

and change it to be like this:

function wp_sm_get_header() {
    // load script
//    wp_register_script('wp_sm_front_end_script_custom', plugins_url('/js/jquery-ui-1.7.3.custom.min.js', __FILE__), SM_VERSION);
    wp_enqueue_script('jquery');
    //wp_deregister_script('jquery-ui-core', 'jquery-ui-dialog');
//    wp_enqueue_script('wp_sm_front_end_script_custom');
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('jquery-ui-dialog');

Check to see if the forum page is working.

This wont be the end of it as that file you posted has some other libraries embedded in it but it is the place to start. So this might still error (the php code for this plugin is a bit of a tangle to be honest) but we can fix that when we see the result of the above. However - it would be useful if I could get to the forum page ion your site. at the moment I am getting 'Sorry. You don’t have access to this page. Please register and request permission to view it.' even when logged in with the credentials you supplied.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Josh Thomas
Member
Free Members
sp_UserOfflineSmall Offline
Oct 30, 2012 - 8:53 am

That suggestion seems to have fixed the problem. Thanks for finding it so quickly. I owe you a steak sandwich!

I also adjusted the membership access so you can see the forum. Sorry, this is a new software, and I'm still figuring it out.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 30, 2012 - 10:05 am

Well hat sounds promising.
Remember there may be some other, non-forum related things that don't work as they should. If you find any come on back and we can track them down and load the support script properly.
I would let the membership guys know we have made this change and why as well. And why we recommend using the proper WP api for these scripts.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625