• About
  • Contact
  • Skype
  • Browse

    Latest Coding

    Latest Daily

    Latest Health

    Featured Story

Forum 2020

| Home | File Bank |  Register | Reply | Search | Statistics | Manual |
Coding Forum Home / Coding /  

Admin Only Iframe Content For This Forum!

Author Admin

#1 | Posted: 3 Sep 2020 10:39 | Edited by: Admin 
There is no need for this hack. I couldn't post code as I had set admin to be able to use html. A simple fix was to cancel it.

This minibb forum doesn't have the ability to display code blocks. I thought this wouldn't be too hard to incorporate but the minibb forum isn't an easy one to figure out, especially the BBCode side of things. I scratched my head too many times over this. As usual though I begin to think of solutions that are completely out of the box.

Brainwave 1

How's about an iframe pulling in text files? Fair enough, so I coded the iframe ability into the minibb forum. As this is meant for myself only I have made the iframe link show only for admin (me). OK, first job done, but what about all the fiddling with various text files and the like? By the way, the iframe code I used auto-adjusts in size to the iframe content source.

Brainwave 2

Why not use a flat-file CMS, such as Bludit, to create the necessary text files? OK - Bludit installed and ready to run. Bludit doesn't allow access to the text file directory though but by altering the htaccess file I was able to overcome this. I have also protected the Bludit installation from both crawlers and hackers by a number of ways to disallow direct access.So now I am able to create text files on my server using a great piece of software with a built in editor. I still had a problem with targeting the text file. The last thing I wanted was to have to create all sorts of new files on my server each time I wanted to create a new iframe.

Brainwave 3

Next brain-wave occurred: why not use the $_GET php variable. By using this I am able to retrieve information from a supplied URL and use the information within a targeted html page in whatever way I want. In this instance I used it to target the Bludit page directory structure as it creates a new one for each new content. I then added this URL extension to the minibb iframe popup prompt. All I have to do now is create whatever I want to display in an iframe code box in Bludit and then within minibb I simply add the title of the Bludit page in the iframe prompt. What this does is to retrieve the Bludit text file and display it within the iframe template html file within a minibb post. This means I can post anything I want within Bludit (especially complex code) and I can then display it within a minibb post in just 2 easy steps. An example below, which is the content of my iframe template file ...

Works just great

Brainwave 4

Add another minibb BBCode editor link to open up Bludit so I don't have to go looking for it all of the time - maybe using Fancybox so that it appears much more a part of minibb than a separate package. Next job then ...

Job completed - see image below. The icons only show for Admin - myself (the 2 new icons on the left).

New BBCode Admin Icons

Brainwave 5 and final job

Combine Bludit login with minibb login so they appear very much a part of the same system

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

Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Forum Home Powered by Bulletin Board Script miniBB ®
Online now: Guests - 2
Members - 0
Max. ever online: 406 [6 Feb 2020 07:33]
Guests - 406 / Members - 0
No Of Posts

  • Latest Daily Post ...

  • Latest Health Post ...


Phone: +01 0775 8107 427



email icon Mark Jones

Latest Story


  • Copyright © 2018 MKJ Brainwaving