XenWord Pro [Deleted]

Just a little update.

The last time I wrote about custom roles, I thought the code was working. Unfortunately the roles wrote to the database but the gravatars failed. The code was abandoned and other work moved forward.

I thought when I woke up this morning that the code needed just a clever foreach loop. Sure enough, the few lines were added tonight and the foreach loop works. Now it's cleaning up the writing of the custom roles to the database.

No promises because this has been a 6 month journey. Here's proof of the usermeta table ...

Screen Shot 2014-05-19 at 6.29.35 PM.webp

The role guest was created with the Members plugin. The other custom role came from another plugin. Cool eh? :D

This will require tons of testing - because it was embarrassing when I thought it was working and I didn't catch the Gravatar bug.

If you are interested in playing with this code and think you have a way that might be better then please send me a PM. I can give you early access to this code. Of course, I'll tinker more tonight and see if things hold. If it does then I'll upload it for all the holder's of the developer license.

Oh wait ... one more piece of evidence.... This screenshot shows a print_r ($value) ...

Screen Shot 2014-05-19 at 6.28.59 PM.webp
 

Attachments

  • Screen Shot 2014-05-19 at 6.14.27 PM.webp
    Screen Shot 2014-05-19 at 6.14.27 PM.webp
    8.7 KB · Views: 4
when i want to upgrade from 1.0.09 to 1.04.01 i got this error :

Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/dikey/public_html/wp-content/plugins/xenword-1.0.4.01/widgets/xenword-xf-login-widget.php on line 85

how can i solve this problem ?
 
when i want to upgrade from 1.0.09 to 1.04.01 i got this error :

Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/dikey/public_html/wp-content/plugins/xenword-1.0.4.01/widgets/xenword-xf-login-widget.php on line 85

how can i solve this problem ?

This was reported this morning too. Sorry. It seems to work on some servers but not all. I don't have details as to which ones are failing.

Go to line 85 in the /widgets/xenword-xf-login-widget.php file. Comment out the full line.

Change:
PHP:
echo 'Hello ' . $XF->getUser()['username'] . ',<br />';

To:
PHP:
// echo 'Hello ' . $XF->getUser()['username'] . ',<br />';[php]

Those who do not want to comment out the line then use:

PHP:
echo 'Hello ' . $XF->visitor->username . ',<br />';
 
Last edited:
Hi

Yes, that widget needs work. Actually, I've ripped apart the plugin and am trying to piece it back together using something besides get_userdata pluggable. Currently the get_userdata is the key to assigning roles to the XF secondary usergroup. For the new code, the latest var_dump shows the role is correctly assigned but - sadly - the role is not being updated in the database. Once get_userdata is no longer used then I can clean up all types of earlier problems ... ( I hope ... Imagine being able to use WP users, membership plugins, and more ).

Was this ever addressed or is a rework in the immediate future?
 
Was this ever addressed or is a rework in the immediate future?

Yes, two posts above you I describe an alpha version which is a kludge. It's a loop with added if statements to add in custom roles. It isn't perfect but made this quick video for you and anyone else curious.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Yes, two posts above you I describe an alpha version which is a kludge. It's a loop with added if statements to add in custom roles. It isn't perfect but made this quick video for you and anyone else curious.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Aha, thank you. I saw it but didn't comprehend right off the bat so I skipped over.

Awesome!
 
Added an installation video to the resource for individuals new to WordPress, XenForo, and XenWord.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
It doesn't appear as though posts that are scheduled for future publish dates create threads in the forum once that publish date comes... Am I doing something wrong or is this not a feature yet?
 
It doesn't appear as though posts that are scheduled for future publish dates create threads in the forum once that publish date comes... Am I doing something wrong or is this not a feature yet?

I was just getting ready to revisit this topic. You are always one step ahead of me :)

For now, you can create a thread, get the thread_id, go to the database for WP, add that thread_id into the wp_post table for the article.

It's painful but I'm working on a solution.

For now - I'm super excited about custom roles. I think it is working and plan to upload in a few minutes to the developer license holders. If they say it's a go then it'll be available to everyone else.
 
I was just getting ready to revisit this topic. You are always one step ahead of me :)

For now, you can create a thread, get the thread_id, go to the database for WP, add that thread_id into the wp_post table for the article.

It's painful but I'm working on a solution.

For now - I'm super excited about custom roles. I think it is working and plan to upload in a few minutes to the developer license holders. If they say it's a go then it'll be available to everyone else.

Awesome! I don't plan on having that many post-dated blog entries so editing the database is fine for now :)
 
Newest version is working great for me!

Another feature request... Is there a way for WordPress to know the post count of the discussion thread? Right now it shows everything with zero comments on the WordPress side even if the thread has dozens.
 
Newest version is working great for me!

Another feature request... Is there a way for WordPress to know the post count of the discussion thread? Right now it shows everything with zero comments on the WordPress side even if the thread has dozens.

I just checked and the comment count is correct. It adds the discussion thread ones plus the WordPress ones. See attached image.

Is something unique about your theme?
 

Attachments

  • Test Post to See if XenWord 1.0.5 is working   XenWord.webp
    Test Post to See if XenWord 1.0.5 is working XenWord.webp
    104.7 KB · Views: 4
Please check the comments section settings in XenWord and let me know how you have the options set.

Screen Shot 2014-05-25 at 1.17.14 PM.webp
 
LPH updated XenWord with a new update entry:

WordPress Custom Posts and New Text Variables

The new release of XenWord is now available to everyone who holds a license. This is a major change for roles and capabilities. Custom roles will now write to the wp_usermeta table.

1.0.4 to 1.0.5 Changes:
Major changes from 1.0.4 to 1.0.5 include new code for WordPress custom roles and addition of variables for changing submission, continue, and discuss text.

Specific changes from 1.0.5.02 to 1.0.5.03:
  • Tested: WP 4.0-alpha
  • Tested: XF...

Read the rest of this update entry...
 
Back
Top Bottom