miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Admin only auto-resizeable iframe to display code in particular

 
Author Bluesplayer
Partaker
#1 | Posted: 3 Sep 2020 14:24 
I looked into creating a code box on minibb forum, but the complexity took the wind out of my sails. I really needed the ability to post code as I am always messing around with code in one way or another. So, as usual, I began to think of alternatives. Now? In less than 2 hours I have 2 new BBCode icons. One opens up a flat file cms called Bludit (my next job is to share the same login credentials with minibb) in Fancybox and the other opens up an auto-resizeable iframe prompt. I simply add the title of the newly created Bludit content page to the end of the iframe URL and the job is done. I can now create as many code boxes as I so wish (or display anything else for that matter than minibb can't handle). Works really well. How I did it is below. I might well write another much more involved piece showing all the steps I took plus the code to go along with it.

ADMIN ONLY IFRAME CONTENT FOR THIS FORUM!

http://brainwaving.co.uk/forum/index.php?action=vthread&forum=15&topic=40#msg85

Author Paul
Lead Developer 
#2 | Posted: 4 Sep 2020 22:49 
It would be perfect if you provide screenshots. How anyone could log-in as admin to check what this all is about? Or am I missing the point...

Author Bluesplayer
Partaker
#3 | Posted: 4 Sep 2020 23:16 
Paul:
It would be perfect if you provide screenshots. How anyone could log-in as admin to check what this all is about? Or am I missing the point...
It is a bit wacky, but it works really well. I have created another post since with iframe boxes in the content and no issues whatsoever. With Bludit you can just paste the contents of an html file, php file — javascript, whatever and it displays as is without parsing, but you can also mess with the source too whereby the code will be parsed. Perfect for displaying all sorts of code.

Rather than log in as Admin I could make a video as it might be confusing otherwise. In fact though, it is a dead easy to use, but I have my doubts whether anyone else bar me would use it, but you never know. I shall make a short video whereby anyone can see how it all works. I doubt whether you would think it is a viable solution though. Then again, it would be dead handy on this forum come to that. Really what is really needed is a code box in minibb. I have just thought of a work around is all — as I tend to do. I shall make a video whereby I create some content. Should be completely apparent then.

Author Paul
Lead Developer 
#4 | Posted: 4 Sep 2020 23:28 
Bluesplayer:
I shall make a short video whereby anyone can see how it all works.
Yes, it would be great! Post it on YouTube with no doubt.

Bluesplayer:
I doubt whether you would think it is a viable solution though.
It's your solution :) You share it with others, and noone could be really sure how it grows. It doesn't matter what I think, but how it could help the others.

Author Bluesplayer
Partaker
#5 | Posted: 5 Sep 2020 00:07 
Embarrassing!

There is no need for this hack. The reason I could't post code was because I had allowed Admin to post html by setting $adminHTML=TRUE. If I log in as Tester (a normal user) I can post the code directly and minibb displays it as is — just like Bludit does. To cure the problem I just have to set $adminHTML=FALSE in setup_options.php

Ouch!

Oh well, you live and learn. Maybe I can use it for some other purpose. At least I am learning how to manipulate minibb code while messing around.

Author Bluesplayer
Partaker
#6 | Posted: 5 Sep 2020 00:45 
Going off issue a bit but I'm thinking of creating a shopping script of my own. I created a shopping comparison script from scratch a long while back that is still up and running. It works off datafeeds. Instead of ripping minibb apart every few hours I think maybe it would be a good idea to focus on something else instead. A small and fast shopping script should occupy me for a while. I have recently started flogging stuff on Ebay so it might come in handy. Seems to me my upgraded minibb forum is working great and has all the bells and whistles it could possibly need, but if I end up twiddling my thumbs for any length of time I might well think up something else that it could do with when it probably doesn't. Yeah, a full hog shopping script seems a good idea to me and should keep me occupied for quite some time to come.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Admin only auto-resizeable iframe to display code in particular
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑