[Endless Horizon] Advanced Open Graph [Deleted]

@doublespaces Preview of the new setup (I actually already finished coding it and it appeared to be working just fine, but I'll postpone update since I'm out of city at the moment):
admincp_options.webp screenshot-localhost-2017-02-09-00-04-00.webp screenshot-localhost-2017-02-09-00-02-06.webp
Do tell if you have any specific request.

edit: Display on users with no permission to edit thread title but still have permission to use the tools:
screenshot-localhost-2017-02-09-00-09-37.webp
 
@doublespaces Preview of the new setup (I actually already finished coding it and it appeared to be working just fine, but I'll postpone update since I'm out of city at the moment):
View attachment 147786 View attachment 147788 View attachment 147787
Do tell if you have any specific request.

edit: Display on users with no permission to edit thread title but still have permission to use the tools:
View attachment 147789

Okay, that is seriously cool. Fantastic! By the way, I do a LOT of posting to my FB group. I use this addon all the time now so that threads show the latest photos, even if they are several pages deep into the thread. Now I can teach people to update this themselves.
 
BobbyWibowo updated [Endless Horizon] Advanced Open Graph with a new update entry:

Updated to 1.7.3

Notice: Customers will receive an email containing the installations file a few minutes after this change log was posted in XenForo's Resources section.
Click "... Read More" to see some preview images.

Change logs:
  • Removed the old implementation of allowing user to define explicit Open Graph image as well as triggering Facebook API Call to trigger Facebook to re-scrape thread (new implementation explained in the following change logs...

Read the rest of this update entry...
 
@doublespaces Btw the explicit Open Graph image option still doesn't have verification thingy. You can basically enter anything you want into it and it will just save the value. I was thinking of doing a simple RegEx pattern match, but it would only guarantee that the input was a link (you could still enter some random link which didn't lead to an image). Then there's a simple header scrape with cURL which will only work as long as the target server tells the file's filetype in HTTP header (I'm not aware of any site which doesn't do so, but it's possible). The cURL method won't be much of a burden on the server as long as it's only scraping the header I think, but should I? I made the tools assuming it'd only be used by trustworthy individuals, since untrustworthy ones may enter a link to 'questionable' image, so I honestly thought it wouldn't matter much without verification thingy.
 
Hi @BobbyWibowo loving the new update! I seem to have an issue with the first og image URL sometimes. It puts my root url appended by CDN data URL and is of course invalid:

Code:
<meta property="og:image" content="https://www.talkbass.com/https://images.talkbass.com/data/attachments/3451/3451726-abf41f01d13b956e7d797e8da76796d1.jpg" \/>

Any ideas where this might be coming from?
 
@kontrabass Did you fill that domain as your CDN domain in the add-on's option? I'll be honest that I actually haven't tested it when having the CDN domain filled, so it might have behaved that way due to a miss in the codes that I wrote somewhere. I'll try to double-check the codes in a few hours (currently outside and didn't bring my laptop with me).
 
@kontrabass I just checked the code. It's not supposed to do that. It will directly add the exact same string you fill through Advanced Open Graph Tools. No additional modification will be added to the string. If you're not using any add-on/extension which will remove HTML comments, you can try to look for this string in the thread's source code:
Code:
<!--EHAOG_advog_explicit_og_image:
After that string, you will be able to see the actual string the add-on has fetched from the database. If it's not the same as the one added in og:image, then I'm not sure what the cause is. I can only guess that there's another add-on which tampers with Open Graph image in your site. But if it's the same, then it's most likely because someone 'mistakenly' wrote your root URL before the image URL.

Ps. That string left behind in the HTML source code was a design mistake I did. I'd usually remove such 'helper' strings, but I forgot to do so for this particular one. You may expect the string not to appear in the next version. It's harmless anyway, so no need to worry.
 
@kontrabass I just checked the code. It's not supposed to do that. It will directly add the exact same string you fill through Advanced Open Graph Tools. No additional modification will be added to the string. If you're not using any add-on/extension which will remove HTML comments, you can try to look for this string in the thread's source code:
Code:
<!--EHAOG_advog_explicit_og_image:
After that string, you will be able to see the actual string the add-on has fetched from the database. If it's not the same as the one added in og:image, then I'm not sure what the cause is. I can only guess that there's another add-on which tampers with Open Graph image in your site. But if it's the same, then it's most likely because someone 'mistakenly' wrote your root URL before the image URL.

Ps. That string left behind in the HTML source code was a design mistake I did. I'd usually remove such 'helper' strings, but I forgot to do so for this particular one. You may expect the string not to appear in the next version. It's harmless anyway, so no need to worry.

Thanks for the tips - I cannot find that comment in my html source anywhere so something must be stripping it. I'll hunt around for any add-on we're running that would mess with the Open Graph image URL and report back :)
 
@kontrabass Did you fill that domain as your CDN domain in the add-on's option? I'll be honest that I actually haven't tested it when having the CDN domain filled, so it might have behaved that way due to a miss in the codes that I wrote somewhere. I'll try to double-check the codes in a few hours (currently outside and didn't bring my laptop with me).

I did have the images.talkbass.... url in the CDN domain field, but I removed it just now and no change.

I do have the same CDN url in my xenforo config.php...:

Code:
$config['javaScriptUrl'] = 'https://images.talkbass.com/js';
$config['externalDataUrl'] = 'https://images.talkbass.com/data';
 
Since updating I am having multiple errors like this:-

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'explicit_og_image' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
Generated By: rubberburner89, 40 minutes ago
Stack Trace
#0 /home/pcsg/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/pcsg/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/pcsg/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/pcsg/public_html/library/XenForo/DataWriter.php(1638): Zend_Db_Adapter_Abstract->insert('xf_thread', Array)
#4 /home/pcsg/public_html/library/XenForo/DataWriter.php(1627): XenForo_DataWriter->_insert()
#5 /home/pcsg/public_html/library/XenForo/DataWriter.php(1419): XenForo_DataWriter->_save()
#6 /home/pcsg/public_html/library/XenForo/ControllerPublic/Forum.php(830): XenForo_DataWriter->save()
#7 /home/pcsg/public_html/library/phc/tweetIt/Extend/XenForo/ControllerPublic/Forum.php(14): XenForo_ControllerPublic_Forum->actionAddThread()
#8 /home/pcsg/public_html/library/XenForo/FrontController.php(351): phc_tweetIt_Extend_XenForo_ControllerPublic_Forum->actionAddThread()
#9 /home/pcsg/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/pcsg/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(62) "http://www.pc-sg.uk/forums/farming-simulator-17.208/add-thread"
["_GET"] => array(0) {
}
["_POST"] => array(14) {
["prefix_id"] => string(2) "68"
["title"] => string(41) "Latest Patch 1.4.2? I think is the number"
["message_html"] => string(445) "<p>Any of you guys experience a definite performance hits with the new patch? I've been running everything full bore, highest setting's possible in FS17 since I built this PC (2 GTX 1070's).... however today, I jumped out of game, and when I came back it updated.... I've got some nasty lag going on now. I had it occasionally before (maybe once every 5 minutes, for a second or so), but now, every other pass I make up the field is laggy.</p>
"
["_xfRelativeResolver"] => string(65) "http://www.pc-sg.uk/forums/farming-simulator-17.208/create-thread"
["tags"] => string(0) ""
["attachment_hash"] => string(32) "6ddfc6c2957f6f793c32655818fa7628"
["watch_thread"] => string(1) "1"
["watch_thread_email"] => string(1) "1"
["watch_thread_state"] => string(1) "1"
["poll"] => array(5) {
["question"] => string(0) ""
["responses"] => array(2) {
[0] => string(0) ""
[1] => string(0) ""
}
["max_votes_type"] => string(6) "single"
["change_vote"] => string(1) "1"
["view_results_unvoted"] => string(1) "1"
}
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(46) "/forums/farming-simulator-17.208/create-thread"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}

Its effecting other addons including resource manager and welcome thread causing them to throw the same errors.
 
Hmm, are you running MySQL on STRICT mode? I think I didn't specifically define a default value while preventing it from using NULL value indeed.
Can you try to run this query on your XenForo's DB table? (make a backup just in case)
Code:
ALTER TABLE xf_thread MODIFY explicit_og_image TEXT NULL;

I don't plan on releasing any future updates for 1.7.x branch, as I had already begun working on 2.0.0 with completely rewritten mechanism. So you'll have to use that query to solve this issue for now. I'll make sure to have the SQL query has a default value set in 2.0.0.
 
Last edited:
@BobbyWibowo, Do you have plan when will be out v2 ? One more thing, Can add option for Specific image dimensions: only [ img] or [ attach] over this dimensions can be used as <og:image> , Grabbing x number of images: so you can display multiple images in a FB post with link. Limit images' size from grabbing in KB. As well Rebuild Caches Features.
 
I can probably add dimension checker for attachments, but unlikely for IMG tags.

Grabbing x number of images is roughly what the Maximum images/links option do (can't remember the option's name).
Though, in v2 this has been improved even further (it will capture a maximum of x images from the first y posts within a thread - x and y configurable).
v2 will also come with a Smart Cache. Parsed tags will forever be cached until someone edit any of the first y posts within a thread (as I've mentioned, y is configurable). So the parsed tags should always reflect the thread's latest state while maintaining performance boosts from caching. As for caches of white border and combined images for preview, I only have rough plans for them at the time being. I think I'll also make them update as necessary when someone edit any of the first y posts or something.
 
There are some threads here containing a little bit of preview of version 2.0.0.
One of the highlighted features is the ability to limit x amount of first posts from a thread to be used as the image source. In version 1.x.x, each page of a thread will have its own set of images, but starting from version 2.x.x, regardless of which page you share, there will only be a single set of images.
Then, the image order. In version 1.x.x, YouTube thumbnails will always be added at the end, but starting from version 2.x.x, their order (including images and attachments) will always reflect their positioning within the post.
There's also the video tags support. It seems to be working properly on Facebook, while Twitter requires manual approval from Twitter staffs before your site can display itself as a Player Card.
... and various other things.
I'll test it out for a while longer to make sure it's completely ready for production (though I had already launched it in my forum, but since mine lacks visitors anyway, so meh).
 
BobbyWibowo updated [Endless Horizon] Advanced Open Graph with a new update entry:

Updated to 2.0.0

Notice: Customers will receive an email containing the installations file a few minutes after this change log was posted in XenForo's Resources section.
Click "... Read More" to see some preview images.

Change logs:
  • Completely rewritten core mechanism from scratch! Refer to the screenshot below for new/changed Admin options.
    The add-on now requires PHP 5.3.0 or newer!
    View attachment 149149 ...

Read the rest of this update entry...
 
Last edited:
Top Bottom