Ravens PHP Scripts: Forums


View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> WYSIWYG - Raven's RavenNuke(tm) v2.x Distro
Author Message

Joined: Jun 09, 2007
Posts: 172

PostPosted: Mon Oct 13, 2008 3:17 pm Reply with quote

I am sorry if the title is confusing, and I hope that I am putting this in the correct place.

This is what I am trying to find:

I have created a Iframe for my pastor, but would like to have something setup like when you submit news, this way if he wants to change anything under his frame he can without having to redo the page in a external editor and then upload everything.
like when your looking at the home page in admin mode, you see edit at the bottom of the news page, well something like that at the bottom of the iframe and when its completed with the editor it post in the correct place..

I can explain this in more detail if need...Any suggestions or help would be great.
View user's profile Send private message
Site Admin

Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Mon Oct 13, 2008 5:33 pm Reply with quote

It really depends on how you are using the iframe.
You could create a new module and add wysiwyg functionality to allow him to edit a page within the module.
Or you could give him administration rights to the news module or even the content module but as I said, it depends on how you are using the iframe.
View user's profile Send private message Send e-mail
PostPosted: Mon Oct 13, 2008 6:28 pm Reply with quote

To try and explain what I am doing. I am using a Iframe that has a pic of the pastor and under that there is info that he typed up. after time, he likes to change some of the info and before it is hard to upload the changes. so it would be great to have a module added or that would work with his page so he could edit it online.
I am thinking that it would have to be setup with admin or some type of permission so everyone wouldnt have access to edit the info.
It is not being done with news, and I am looking at the content modules, but the little i am reading so far its more for like forums or news, i could be way off there, but i am still reading.
So I guess in short, if a wysiwyg module could be done in a created Iframe and would have restrictions to who could edit. This would be ideal for what I am trying to do.
sorry if i am rambling, I am watching my grandson while trying to get this typed out Smile
PostPosted: Mon Oct 13, 2008 6:36 pm Reply with quote

So I presume you are using the iframe on the front page and nowhere else?
If thats the case, you could make him an admin and just give him permissions to access the 'Message' module. Although you wouldn't be using your igframe, it would give you the functionality you need. You can even make the messages disappear after a given length of time too.
PostPosted: Mon Oct 13, 2008 7:43 pm Reply with quote

I am at my computer again, so here is exactally what I have done Smile

I created 2 folders in the modules folder 1.church 2. pastor...inside the church folder i put a folder called pastor...here i store the pic that i used and text that I used.
Inside the main pastor folder i created an index.php file with this code:

      /* ----> Module file used to load external URL's into an I-Frame            */
      /*       Many thanks to forum users everywhere & specifically the           */
      /*       wowroster team for inspiring me to figure this out!         <----  */
     if (!defined('MODULE_FILE')) {
          die ("You can't access this file directly...");
       $module_name = basename(dirname(__FILE__));
      /* ----> change the site URL information that you wish to load here         */
       // this is the id of the iframe
      // Change this if for some strange reason, there is another id with the same name
      /* end url input <---- */
        define('INDEX_FILE', true);
       /* ----> iframe code to load above URL                                      */
      echo '
        <script language="JavaScript" type="text/javascript">
      function calcHeight()
    //Smallest the frame should ever be
      var min_height=0;
        //Largest the frame should ever be, 0 for no max
        var max_height=0;
        //find the height of the internal page
        var the_height = document.getElementById(\'' . $iframe_id . '\').contentWindow.document.body.scrollHeight;
        if(the_height< min_height)


           the_height = min_height;
          else if(max_height != 0)
           if(the_height > max_height)
              the_height = max_height;
        //Pad it a bit so firefox doesn\'t show scrollbars
        the_height=the_height + 50;
        document.getElementById(\'' . $iframe_id . '\').height=the_height;
      <iframe id="' . $iframe_id . '" name="' . $iframe_id . '" src="' . $go_to_address . '" width="100%" onload="calcHeight()" frameborder="0" scrolling="auto"></iframe>';
      /* end iframe load <---- */

you will notice in this code that it should work dynamically and all i needed to do was edit the $go_to_address to show where it is.

I then go into admin and load the modules and activate pastor. I then set pastor to show in the modules block.

Now when i click on the pastor, it opens the pastors pic and info in a Iframe, and looks fine.

What I am looking to do Smile *hard part* is to set the info up where it can be edited online...i figure the wysiwyg editor...Now if there would be a way to add that to the iframe info so a certian group or admin with certian permissions could edit this with the wysiwyg editor, that would be great.

I am thinking that it could be something like you said and have the Iframe load the wysiwyg editor and post it to the specific name and place.

I am sorry if i am going in the wrong direction, but I am still reading and trying to find out if this can be done and how.
New Member
New Member

Joined: Jan 06, 2006
Posts: 18

PostPosted: Sat Oct 18, 2008 4:58 am Reply with quote

I'd like to suggest a simple solution I've used for allowing non-nuke folks to edit information. I have on occasion created a google doc via google apps and given the necessary users access to that document to edit it. I then create a nuke message or content page and simply put that published google doc in an iframe. Any changes they make on the google doc are automatically posted. It is not the prettiest thing in the world but it eliminated the need "teach them" any nuke admin responsibilities.
View user's profile Send private message
PostPosted: Sat Oct 18, 2008 1:27 pm Reply with quote

I will look into this too

At the moment i have updated to the new content plus and even though it is not the exact thing that i was wanting, i can give access to the content to certian people without giving them access to anything else, and the wysiwyg built in editor is familure to them since they use word and the likes alot.

I am still researching for a means to add a wysiwyg editor to a iframe, and set permission for a specific group or higher could do this.
Or create a type of content editor that would work with the same method of an iframe.

I will continue to look into what it would take to do something like this, but with no programming knowledge it will be a "long" road Smile
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Oct 19, 2008 3:36 pm Reply with quote

Perhaps we can entice Kguske to comment on this but I found out today that iframe is not in the alloweable html array in the rnconfig.php file. A Google Map I previously had working was not working correctly and that's where I noticed it. This was in a new content module that we are experimenting with for 2.30 (as an add-on) but I just checked some older distribution files and iframe was not alloweable there either.

So, if I would paste the link for the Iframe in from Google the wysiwyg editor would "eat up" the iframe tag and spit it back out. Placing this at the bottom of the array in rnconfig solved my problem but I would want his input before recommending it as a general solution:

'iframe' => array('width' => 1, 'height' => 1, 'frameborder' => 1, 'scrolling' => 1, 'marginheight' => 1, 'marginwidth' => 1, 'src' => 1),

If you decide to experiment with rnconfig.php please have a backup that you can restore quickly and be aware that it affects every page load for every user on your site.
View user's profile Send private message Visit poster's website
PostPosted: Sun Oct 19, 2008 4:40 pm Reply with quote

I looked into the config file some too, and even tried a few things some others have suggested to me and nothing has seem to work so far.

So here is my thoughts....Smile

Could there be a generic module, that would work like a build in iframe? I am thinking more of a content editor that can be used to save pages that can be used in different areas of the site.
To break this down more....for me;

module - that works like content/news/story editor
settings - can be saved and recalled and used form certian spot on site.
admin - input to edit any of the info, choice of where to display. Could be shown in seperate load under modules or could a setup to show in special box that would allow the load of the page in one click like an iframe.

So any of the editors could be used, it would be the option to use it in other ways an places on the site.

confused? sometimes I am....but I am learning.....by the time I could do this i could be much older....hehe

thank you for any input
PostPosted: Sun Oct 19, 2008 6:13 pm Reply with quote

Look into the blocks editor that's available on the Admin Control Panel. You can create pretty much what you want there and save it as a block and then place that block anywhere on your page. If you need something a little more sophisticated, say for instance a block that pulls "content" from your database and juxtaposes it with some typed in content you can do that too; it just takes a bit of programming.

The blocks editor uses the FCKeditor that is standard with Ravennuke. My earlier post was just pointing out that the iframe tag is not allowed with the standard fckeditor or at least I don't think it is. It looks to me like any iframe tag is getting "eaten" by the fckeditor until you add it to the allowable html array in rnconfig.

And whether that was left out on purpose because of security concerns is a little above my pay grade. You'd need to consult the fckeditor web site or wait for further posts here if you want to be totally safe.
PostPosted: Sun Oct 19, 2008 7:12 pm Reply with quote

I see what your saying, that is why i was thinking about taking another block and modifying it to work with what I am thinking of different things that could be tiried.
I agree, the more I look, there would have to be alot of coding to get this done the way "I " would like to see it done Smile

Alot of times asking or suggesting in here will help start ideas, or direct me to where I need to go and try for myself, or ever someone else may of already done the project.

I am far from a progammer, but i will look around as i can to see if i can come up with any other ideas.
PostPosted: Sun Oct 19, 2008 7:35 pm Reply with quote

Gator: you don't need to be a programmer to come up with new or original ideas. I sometimes pass for a programmer and I've worked with RN for several years but it took a client recently who knows no programming to show me how the blocks editor could really be put to use without any programming. There's just a thousand things built into RN that can be used to distinguish a web site and meet any site's unique needs without any programming. It's creative ideas that count so thank you for yours.
Site Admin

Joined: Jun 04, 2004
Posts: 6383

PostPosted: Sun Oct 19, 2008 9:56 pm Reply with quote

iframe isn't in the allowed html array as it can be dangerous. If you need that, I would recommend a custom block or module.

I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
View user's profile Send private message
PostPosted: Mon Oct 20, 2008 4:01 am Reply with quote

well I have been inspired to try harder to learn how i could make a block or mod to work.
I guess I will start with working with a wysiwyg block and experiment from there.

when i start to make some progress I will continue to ask questions....hopefully it will end up to be something everyone will want. Smile
PostPosted: Mon Oct 20, 2008 5:20 am Reply with quote

You might want to look into an addon module called NukeWrap - it gives you the ability to have a iframes, and you can secure it by limiting the valid links to use as an iframe.
PostPosted: Mon Oct 20, 2008 10:36 am Reply with quote

I looked at nukewrap and I can pretty much do that with some dynamic iframe code that I found.
I am looking more to have like a content module or news module that I can have more control of where it will show, how it will show.
This will give me wysiwyg, it will give me security and the permissions to set for groups or people, it will be able to recall what is posted so it can be edited or deleted.

to expand more of what i am thinking about....for example....the content module...when activate you can goto it on the main page, then you can have catagories and sub catagories. So you might have to go through 2 or 3 pages just to get to where you want to see the information.
I am looking to have something like content that i can place the page where I want!!!! So instead if i looked under modules and seen "test1" and clicked on "test1" then it would load "test1" up by itself, or in the center box.

So my frame of mind would be looking to see if i could edit something like the "content module" to load/edit/save anwhere i would want on the site.
Since the content module is already "safe" and has the "editor" then I would guess the code would need to be added to save and load from any location instead of just under content..

Would this be possible without a ton of work?
PostPosted: Mon Oct 20, 2008 11:12 am Reply with quote

Content is both a module and a block. A module can either be "in home" that is displayed on the home page or not. Only one module can be "in home" at a time. A block can be placed anywhere. There are four "positions": center up, center down, left and right. Within these positions you order the blocks. RN 2.3 uses numbers for the positions instead of the brain dead arrows that *Nuke has used forever ... so ordering the blocks can be done in one swell foop. Take a look at the code for the content block and you will see how blocks generally work.

You can also enter a block on the blocks editor in the ACP. This is primarily used for HTML based blocks and uses the wysiwyg editor. Unless you make iframe part of the allowable html array in rnconfig you won't be able to put an iframe in that way. But you could create a block "offline" in a good editor and upload it and have your iframe that way. (We have to respect kguske's warning about the security of iframes since he knows much more about that than any of the rest of us).

I don't really see what your objection to using the content block is. Yes, the categories and sub-categories can get "in the way" a little when you are creating content items but from a user's perspective they can pretty much ignore them. And you can place the content block anywhere you want. The alternative is to use the blocks editor or create a block offline and upload it. I would also recommend that you look at the content module that's in the addons directory of RN 2.3. It is just a spectacular piece of work with some truly neat and useful features.
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Oct 20, 2008 11:12 am Reply with quote

The easy way would be to just create your own menu links in a block. Don't use the modules menu if you don't want to.

- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
PostPosted: Mon Oct 20, 2008 1:26 pm Reply with quote

so create a block that would use the works of the program "content editor, or wysiwyg editor" and in the block direct the save/load/edit/permissions?
I guess that would be another way to consider, as you could use the mod as a core and the block to direct how to use the core, and could direct where you want to store and display what you want to do without having alot of sub pages.
would you have to add new tables in sql and have a different call to keep the information seperate from the core program your using? or am i trying to make this more difficult then it should?
PostPosted: Mon Oct 20, 2008 1:48 pm Reply with quote

You are trying to make it more difficult than it needs to be. When you create a block in the ACP you use the wysiwyg editor by default. When you create a content page you use the wysiwyg editor. Just use it and stop being so hung up by sub pages is my advise. Either that or take some PHP courses and learn how to program your own block.
PostPosted: Mon Oct 20, 2008 1:52 pm Reply with quote

fkelly: i am sorry i read the last post first....
I like the content block since it seem to have alot of what I have liked...editor...permissions...and more. The problems I have had is that I have been working with this using xampp so i can make sure i have what i want done and figured out before trying to make it live. When I ask people who dont know how to surf web pages very well to look at the site, usually while i am watching or have them tell me later, have had problems with getting lost with having to many sub pages. This is just from testing that I have done, and the numbers are small overall, so I look to have the pages load from the home page as this attempts to help everyone with the site.
there are also a couple people who i want to let edit their "content" and the editor lets me give permission just to content and not everything else.
So now after reading Evaders99 post, i was thinking that a block that is placed on the right or left that would have links to the content that would load as a full block on the home page when selected...like an iframe but not a iframe so there is still safty and it will keep from having multi sub pages.
and last i am hoping that i can make easier to maintain. this way the content that would be changed regularly could be done online instead of uploading. This is what I use to do, and since it was unsafe to give to many ftp access to upload.

I am sorry about the book...this is all a learning experience for me as i have learned all this by trial and error...Smile

thanks for the input....it all helps
PostPosted: Mon Oct 20, 2008 2:55 pm Reply with quote

gator: we appreciate the struggles you are having and your desire to make the web page simple to use. LOL, I have a client for a web page I run who is driving me nuts with the same kind of "requirements". Who said web pages should be easy to use?

Sorry that was tongue in cheek, so to speak. Especially since you have xampp and will probably be working with the content block, please do yourself a favor and go get the new 2.30 and install the content block that's in the addons area. It is a huge improvement.

Now, as to menus, like Evaders stated you can create your own menus in a block and have them point specifically to the pages you want to link to. One technique I use is to have two tabs open in Firefox. Go to the one that is the page you want to link to. Copy the Only registered users can see links on this board! Get registered or login! in the address bar. Now on the tab where you are creating the menu block paste the Only registered users can see links on this board! Get registered or login! of the target into the link builder in the wysiwyg editor. Save it and repeat for each link. Voila. However, bear in mind that if you have a constantly changing list of pages this can get tedious. The content block itself (and this is why I asked you earlier to look at the code) builds an updated list of links to each content page. It's automatic and always up to date. I'd recommend it unless you really have to have a customized menu. That's your decision.
PostPosted: Mon Oct 20, 2008 4:09 pm Reply with quote

I think i have the latest version of RN since it has only been like a month since i started working with the software. For right now i have updated the content to content plus that was shown on the home page. After doing some testing and helping the author with some bugs that they fixed really quick I have been working with it....the only problem i have now is trying to get flash to work....but i was told that was a rn cfg issue as its not allowed or something like that. but thats something else i am working with Smile

Now for the blocks that were suggested Smile Instead of the block just being configured with links to the page that content plus creates, could the block be configured to re-direct them to the first page? so the names created in content would be put in a box on the home page and then you just click on the name and it loads the content without going to a sub page or two.

Now i know this is not my own journal but typing this out helps me some too Smile

1. create a block where it has generic title or title of choice
2. block grabs info from content input and places title text in block, this would probally do a call from the sql table
3. when you click on title in home block, it loads a new page dynamically on the home page.
4. i guess that page would be a block that would open the new page that could be either the center block, or block that would take the center and right blocks (like when you open forums) you still have the header/left and footer.

Now if this would work:
you wouldnt have to worry about url's to new pages
admin is for content, so you could edit/store/load
permissions can be given to edit

there was a post where someone duplicated content for second usage, so one was for one topic and another was for second topic so permissions could be set different for each of those. This could be considered here too.

I also thank everyone for all the extra time to help me with all of this, I know it takes your time, and as I get better I will try to use your example to help others Smile
PostPosted: Mon Oct 20, 2008 4:40 pm Reply with quote

well i would like to say...."Guess what I found!!"

I guess there was a block that was already created since i went into my blocks folder to start some checking and seen the block there, after loading, it did what I was posting.
I am either on the right track since this is what i was thinking about.
Or I need to check all my stuff better.
PostPosted: Mon Oct 20, 2008 5:59 pm Reply with quote

RN 2.30 was just released earlier today. I would suggest getting a copy from the downloads page and upgrading what you have to it, then reloading the content plus module from addons as per the excellent instructions in the readme file there. That way you will know you are dealing from a full deck of cards.
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> WYSIWYG - Raven's RavenNuke(tm) v2.x Distro

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
Forums ©