• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Uploader calls the Demo site's default login on ProBoard forum

lumiworx

Chevereto Member
I don't know if this would qualify as a true bug, given where the script is inserted, but the behavior doesn't match the expected result.

▶🚶‍Reproduction steps
  1. Select the copy/paste code from the PUP page using any choice of options; where the URL strings are properly set to the installed domain.
  2. Paste it into any ProBoard theme's layout template that's responsible for the post editor. In this case it was inserted directly in place of the $[attachment_button] short-code
[CODE lang="php" title="From 'Posting Page' layout template"]
<div class="controls">
$[poll_button]
$[event_button]
<!-- $[attachment_button] -->
<span class="yf-upload"><script async src="//gallery.yashicaforum.net/sdk/pup.js" data-url="https://gallery.yashicaforum.net/upload" data-palette="grey"></script></span>
$[options]
</div>[/CODE]

PUP-in-ProBoard-edit-toolbar.jpg

😢Unexpected result

The upload button shows in the forum's post editor toolbar, as expected - but - when clicked, it opens a login popup window for demo.chevereto.com, and not for the installed domain.

📃Error log message

No errors shown

NOTE:
I'm the administrator for the forum, and have made multiple edits to both the forum's style and layout without issue. I could only get this to work in the forum if I edited the gallery site's pup.js file and modified the hard-coded default/fallback URL to point to the installed domain, instead of demo.chevereto.com.

Once the change was made, the login popup showed it was connected to the correct domain, and uploads were possible. After the upload finished and the popup was dismissed, no image was inserted at the cursor position. This is my 1st attempt at working with the PUP code, so I'm unaware if the image should be auto-added to the topic when the upload is complete. It may not matter overall, but the gallery uses BackBlaze B2 as external storage.
 
Proboards is not officially supported. I've tried to workaround their editor but it is too complicated for implementing PUP that I won't consider supporting it until their provide a better editor. Sorry about that.

On why PUP uses demo address instead of yours, for that I need to see the problem on my own because PUP is designed to use demo only if the URL attribute is ignored. Maybe there's an error before that function or something like that, I can't tell without replicating the issue on my own. As this is JS, the issue could be also on the client device.
 
Thanks Rodolfo. I can certainly understand the whole ProBoards issue, and it being unsupported. Sadly, I don't think there will be any changes on how open they'll make their system.

I was surprised the script's URL request wasn't passed as-written. I do know that there are some sanitation checks on any web links inside their posts, and they aren't inserted as 'raw' links. There's no way to know if that's the root cause of it ignoring the PUP's passed URL as an off-site link, but they don't render standard links in comments on any ProBoard forum without them being prepended with a http://redirect.viglink.com/?key=[ your_super_secret_numeric_key__here]=.

I'll try to find out if the same process is used for embedded add-on content, but I don't know if anyone will offer an official answer.

If I leave my code changes in place to pup.js, would that be overwritten with a future Chevereto update? If it will, is there a way to override the default code, or do I need to create a 2nd version as a replacement?
 
If you modify pup.js that could be lost on updates, you should fork your own pup dev at a different filename and compare the files once a while to make sure you have applied updates (not mandatory).

By the way, I don't have issues on debug the URL issue if you give me a place where to test it. Maybe it is just a small bug in the code.
 
I think this may help. Another image plugin found a way to use the editor of ProBoards:



Released as MIT free license.

It looks like this is how you get things to paste into the editor:
Code:
if(this.wysiwyg.currentEditorName == "visual"){
                content = this.wysiwyg.editors["visual"];
                replacement = $("<img src='" + img + "' />", this.wysiwyg.editors["visual"].document)[0];

One of their coders broke out how to achieve it here: https://support.proboards.com/post/7063348/thread
 
Last edited:
Quick reply the default PUP gets it 100% of the time.

Something similar to this should get the WYSIWYG. I can't test it right now, but this probably doesn't work but it is a start if you want to start fiddling with it lumiworx

Code:
            , proboards: {
                settings: {
                    autoInsert: "html-embed-medium", html: '<li class="button button-insertEmbed" title="Insert Embed"><input %x type="button" class="ed_button button button-small" aria-label="%text" value="%text"></li>', sibling: "button button-insertEmbed", siblingPos: "after"
                }
                , editorValue:function(a) {
                    if(MyBBEditor) {
                            if(this.wysiwyg.currentEditorName == "visual"){
                content = this.wysiwyg.editors["visual"];
                replacement = $("<img src='" + img + "' />", this.wysiwyg.editors["visual"].document)[0];
                            }
                    }
                }
            }
 
Thanks @ashkir ... I remember seeing that other plugin quite a while ago, but it didn't occur to me to look at the code. The default placement of the PUP button isn't in a bad place as it is, so it isn't terribly critical to modify it from a design point of view or being in some illogical place. The functional aspect is the more important part for now.

Rodolfo had the opportunity to do some in-depth testing, and didn't see an issue with the demo URL being called when the embed code was explicitly set to the correct site. His suggestion was to debug whatever browser extensions I had loaded that may have interfered with the pup.js and made it misbehave. I'll go through those as time permits to dig deeper into a cause, and update with what I find.
 
This doesn't meet the requirements to be labeled as a bug as it was impossible to trigger the alleged behavior.

However, good news is that thanks to your concern and the help provided by @ashkir is that Chevereto v3.14.2 PUP will officially support ProBoards and it will integrate with their editor (quick reply, post reply, etc).

Cheers,
Rodolfo.
 
  • Like
Reactions: rdn
Back
Top