Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
wxjoe
New Member
New Member



Joined: Dec 22, 2008
Posts: 11

PostPosted: Fri May 06, 2011 7:53 am Reply with quote

So, I want to be able to create a link on the right or left side and have that link open in the center, not external. Do i need to create modules for all the links i want to open up internal in the center?

Please help?

Thanks.

Joe
 
View user's profile Send private message
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Fri May 06, 2011 9:07 am Reply with quote

That link would have to point back to a module that would load in the center if i'm following you correctly.

(A) You would need to build a block that would house the links
(B) You would have to build a module to display the data the link would point to.

_________________
Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett 
View user's profile Send private message
wxjoe







PostPosted: Fri May 06, 2011 9:08 am Reply with quote

Thanks, Thats what i'm looking for!
 
wxjoe







PostPosted: Fri May 06, 2011 9:11 am Reply with quote

Does the module need any special code? or just your regular html/php?
 
killing-hours







PostPosted: Fri May 06, 2011 9:12 am Reply with quote

Remember that your link "href" would be like "modules.php?name=Your_Module".

Well... you would need to follow the modules structure. If you've never built a module, the best way to understand how to do it would be to open other modules and take a look at the way other developers have done it.

The simplest way possible is to just create a module folder (i.e. Your_Module) in the "modules" folder... and put an "index.php" in there to start with.

From there inside your "index.php" put this

Code:
<?php

defined('MODULE_FILE') or die('You can\'t access this file directly...');
include('header.php');
OpenTable();


CloseTable();
include('footer.php');
?>


This is a "clean slate" and most basic way to start a module. From there you need to add w/e you want to add from there between the "OpenTable(); CloseTable();" to display to the end user and w/e other functions you need your script to do.

Happy coding!

p.s. You need to set the modules options in the admins/modules administration and then activate it. Once activated... you can access your module by typing in "http://www.yoursite.com/modules.php?name=Your_Module"


Last edited by killing-hours on Fri May 06, 2011 9:23 am; edited 3 times in total 
wxjoe







PostPosted: Fri May 06, 2011 9:13 am Reply with quote

yup, point to the module. Got it. What about inside the module itself?
 
killing-hours







PostPosted: Fri May 06, 2011 9:18 am Reply with quote

Bump... check my edit. Should get you on the road to creating your own module. Wink
 
wxjoe







PostPosted: Fri May 06, 2011 9:21 am Reply with quote

Thanks so much!
 
bobbyg
Worker
Worker



Joined: Dec 05, 2007
Posts: 212
Location: Tampa, Florida

PostPosted: Fri May 06, 2011 11:30 am Reply with quote

You could also use nukewrap
 
View user's profile Send private message Visit poster's website
killing-hours







PostPosted: Fri May 06, 2011 11:37 am Reply with quote

NukeWrap is a PHP-Nuke module that enables virtually any web content such as html, scripts (home pages, galleries, shopping carts, php, perl, asp, etc.) to be easily incorporated into your PHP-Nuke site. Just call the NukeWrap module with any URL and it will display it in your PHP-Nuke main area/window. I call it a content wrapper (takes any existing content anywhere and wraps your PostNuke site around it. Uses an iframe which must be supported by the browser and JavaScript to resize the iframe (optional). Now comes with an admin interface and a block to show yor links.

Just my own .02... I wouldn't want to rely on a module to do what can easily be done with a bit of time and understanding. I understand the convenience of it... but what other issues "could" it raise further down the line for the development of the module. Also, again... just my opinion, I think it's better to grasp how to create the modules because once you get the hang of it... the sky is the limit & you better understand how your framework operates.

I use an iFrame in one part of my work site for directory listing for my end users... but that's about it. If it can be written to work "within" ravennuke... it should in my opinion.


If you want to show inline content...

Code:
<?php


include('header.php');
OpenTable();

echo"$content    <div align=\\\"center\\\">"

  .   "<iframe name=inlineframe src=Your_Content width=XXX height=XXX></iframe><noframes>;"

  .   "Your browser doesnt currently support inline frames.</noframes></div>";

CloseTable();
include('footer.php');
?>


This is a bit of code I use that could probably stand a great deal of cleaning...

Quick cleaning but not tested:
Code:
<?php


include('header.php');
OpenTable();

echo '<div align="center">';
echo '<iframe name="inlineframe" src="Your_Content" width="XXX" height="XXX"></iframe>';
echo '<noframes>Your browser doesnt currently support inline frames.</noframes></div>';

CloseTable();
include('footer.php');
?>


Last edited by killing-hours on Tue Feb 14, 2012 11:49 am; edited 1 time in total 
Guardian2003
Site Admin



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

PostPosted: Sat May 07, 2011 6:32 am Reply with quote

If you are only needing to display text and/or images there are a plethora of modules out there that you can use and all you would need to do is create your side menu block with links to specific pages of the module.
RavenNuke (tm) already has a Content module installed by default, there are other third party modules like Docs Module, Tutorial modules or at a pinch, depending on what you are trying to achieve there is also the built in FAQ module
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

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 ©