User:CRCampbell/Wordpress Integration notes

From TNG_Wiki
Jump to navigation Jump to search

Back to Top in case that breadcrumb above doesn't show up...(looks like Mediawiki may have resolved that tiny issue)


Using TNG and WordPress with the tng-wordpress-plugin | Check here for cutomization of php files Wordpress and TNG direct integration, no plugin needed#Here are the 5 steps you have to make: (actually should do this anyway so your customizations are not over-written in an upgrade. On second look I don't hink I need to do that with the exception of meta.php just to popint at my custom css so it's not over-written...or if you do a custom footer maybe..not sure why I'd want to do that instead of in WP?...lol)

Once I got WP installed correctly the rest was fairly straightforward..., the keywords being "once I got WP installed correctly"...

My fault really... I got cute on my local server and tried to just copy and paste an install and upload it's db and editing the files... That normally works, but this setup was entirely different from what I usally do... Once I got WP to access the correct db (forgot to change that)...lol, and edited the root index.php to point to the wp-settings.php in the wp install folder...(forgot to do that)....lol, and once I edited my Apache's httpd.cong to change all instances of AllowOverride to All...rolleyes...lol, and once I got the root htaccess seyp correctly....lol, and got the WP install foler htaccess setup correctly...everything was "fairly straightforward"...;)

Now after backing it ALL up....start messing around with it.

Ack;

Fatal error: Uncaught Error: Call to undefined function tng_connect() in C:\xampp\htdocs\occ\wptng\wp-content\plugins\tng-wordpress-plugin\tng.php:1127 Stack trace: #0 C:\xampp\htdocs\occ\wptng\wp-content\plugins\tng-wordpress-plugin\tng.php(617): mbtng_db_connect() #1 C:\xampp\htdocs\occ\wptng\wp-content\plugins\tng-wordpress-plugin\tng.php(705): mbtng_create_user(1) #2 C:\xampp\htdocs\occ\wptng\wp-content\plugins\tng-wordpress-plugin\tng.php(511): mbtng_check_user(1) #3 C:\xampp\htdocs\occ\wptng\wp-content\plugins\tng-wordpress-plugin\tng.php(137): mbtng_login() #4 C:\xampp\htdocs\occ\wptng\wp-includes\class-wp-hook.php(292): mbtng_initialise('') #5 C:\xampp\htdocs\occ\wptng\wp-includes\class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #6 C:\xampp\htdocs\occ\wptng\wp-includes\plugin.php(484): WP_Hook->do_action(Array) #7 C:\xampp\htdocs\occ\wptng\wp-settings.php(560): do_action('init') #8 C:\xampp\htdocs\occ\wptng\wp-config.php(90): require_once('C:\\xampp\\htdocs...') #9 C:\xampp\htdocs\occ\wptng\wp-load.php( in C:\xampp\htdocs\occ\wptng\wp-content\plugins\tng-wordpress-plugin\tng.php on line 1127

"There has been a critical error on this website." - Ya think? lol

#8 C:\xampp\htdocs\occ\wptng\wp-config.php(90): require_once('C:\\xampp\\htdocs...')

That doesn't look right...Double back-slashes, ...? wp-config line 90 calls wp-settings.php with ABSPATH on the front. Too tired. Tomorrow. CRCampbell (talk) 01:50, 21 March 2021 (UTC)



CRCampbell (talk) 15:05, 23 March 2021 (UTC)

Ok, finally got back to this.

Playing around I discovered that if I turned OFF "Integrate TNG/Wordpress logins" in the pulgin in WP that the error went away and TNG appears inside my created WP page as advertised. I don't know enough to say what the problem is let alone correct it unless by dumb luck. lol

Also, I found, again just by messing around, that I could change the Homepage in TNG admin to surnames.php and it would change the Home link on TNG's menu to point at that file. At this point I actually prefer that. The reason being that in the plugin there is another option (checkbox) to have the WP desginated page display inside of TNG's default index page...

I kind of like this idea in that I can create a custon menu in WP to handle all the links on the TNG default index page...and I'm sure I can create a "Home" page in WP to my liking bring to bear the full power of WP (after changing the Home page back to pointing at index.php of course. This should have the Home link in TNG point at my WP created Home page).

Onward.

Update - should have checked the message board first. (https://tng.community). Roger replied there that the login integration was 'seriously broken" at this time CRCampbell (talk) 15:40, 23 March 2021 (UTC) . Good news! I did it right!

Then Mahesh shared this link to another plugin (I think) that handles that job. I downloaded it but haven't looked at it yet. (https://github.com/upavadi/tng-wp-login/releases/tag/2.0.3.1) He said he was using it on TNG 13.02

If I end up not creating any new User Roles in WP I mightgive that a go. I need to tinker and read up a USer Roles vs Custom Profile Types in WP bit more first.