Hodor Hodor

  •  ·  Premium
  • A

    37 friends
  • 47 followers
  • 12406 views
  • 2 votes
  • More
Add new...
 
 
·
Added a discussion

Hey everyone,

I’ve built a custom UNA module that automatically merges uploaded photos into an album — essentially combining and extending the logic of bx_photos and bx_albums to simplify the upload process.

In the current UNA flow, users have to choose between uploading a photo or creating an album. My goal was to make this seamless — users simply upload their images, and the system decides automatically whether to create an album (similar to how Timeline handles multiple images in one post).

I developed this with help from GPT-5 + Codex, but I’m struggling with the final implementation details. I’d really appreciate it if someone could take a look at the code and help me figure out what I might be missing.

Disclaimer

This is a free and open module — I’m not making a cent from it. My hope is that the UNA team considers adding this feature natively in a future release, as I believe it would make the platform’s user experience much smoother.

Thanks in advance!

  • 103
  • 2
·
Added a discussion

How can I modify the “Create Post” module (including options like photos, albums, products, etc.) so that new posts are submitted via AJAX directly to the user’s timeline or outline, instead of redirecting to a separate page? I’d also like the timeline/outline to refresh automatically and display the new content immediately after posting.

  • 109
·
Added a discussion

I am having difficulties binding custom submenu to custom page it created successfully but not displaying

  • 196
·
Added a discussion

Hou to implement bento grid block in studio?

  • 147
·
Added a discussion

On test environment what happed i delete persons module, can i still login as admin and reinstall persons module?

  • 594
  • 1
·
Added a discussion

Can i use the upvote option like in the forum for other modules like albums or photos specifically when displayed in timeline (maybe also replace the 5 stars thing in photos)?

  • 1133
  • 1
·
Added a discussion

So I've played a little with GPT5, Claude etc. to make some changes to make my app safer and reliable. the first thing that i found a big issue for me was the double click on button, some non tech users click twice on add account button or other forms which create errors and such, so you can add this code, it attached to any submit button and once clicked it display 🚫icon and prevent the next click, then after some time enable back by time (can change). Disclaimer! test it on you beta/test app before deploying, I've add it personally in Studio-Designer-Injection<BODY> injection

<script>
// Preventing Double Form Submission
function simpleDoubleSubmitPrevention() {
    document.addEventListener('click', function(e) {
        const target = e.target;
        
        // Check if this is a submit button (all possible cases)
        const isSubmitButton = (
            (target.tagName === 'BUTTON' && (target.type === 'submit' || !target.type)) ||
            (target.tagName === 'INPUT' && target.type === 'submit') ||
            target.name === 'do_submit' || // Specific match for your button
            target.classList.contains('bx-form-input-submit') // Match by class
        );
        
        if (isSubmitButton) {
            console.log('Submit button clicked:', target); // For debugging
            
            if (target.disabled) {
                e.preventDefault();
                return false;
            }
            
            // Save the original text
            const originalText = target.textContent || target.innerText || target.value;
            
            setTimeout(() => {
                target.disabled = true;
                target.style.opacity = '0.6'; // Add visual effect
                target.style.cursor = 'not-allowed';
                
                // Change the text
                if (target.textContent) {
                    target.textContent = 'Submitting...';
                } else if (target.value) {
                    target.value = 'Submitting...';
                }
                
                // Reset after 5 seconds
                setTimeout(() => {
                    target.disabled = false;
                    target.style.opacity = '';
                    target.style.cursor = '';
                    
                    if (target.textContent && target.textContent === 'Submitting...') {
                        target.textContent = originalText;
                    } else if (target.value && target.value === 'Submitting...') {
                        target.value = originalText;
                    }
                }, 5000);
            }, 10);
        }
    });
}


document.addEventListener('DOMContentLoaded', simpleDoubleSubmitPrevention);
</script>

 
  • 2903
  • 1
·
Added a discussion

Is it possible to display the remaining photos from the current album on the photo view page (in the album module)?

  • 4335
  • 1
·
Added a discussion

I'm having hard time setting up S3 storage, found out this manual https://github.com/unacms/UNA/wiki/Remote-Storage but it's not much, i will apricate if a step by step manual can be created to set S3 storage on UNA.

Thanks in advance

  • 4572
Hodor Hodor Discussions
Custom Module: Automatically Merge Uploaded Photos into Albums
Implement AJAX Posting for the 'Create Post' block with Instant Timeline Update
Submenu
bento grid
Delete Person module
Upvoting other module