Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
rjms
Regular
Regular



Joined: Feb 10, 2012
Posts: 56

PostPosted: Sat Feb 18, 2012 5:24 pm Reply with quote

fkelly wrote:
While making a module serve as a link should work, you might want to consider other approaches as well. Like for instance, if you have an opening message at the top of your web page just put the link in there using the links editor and some prominent fonts and positioning. Or even create a block that has nothing in it but the link to your Gallery and position that center top using the blocks editor. Or add a sample picture to such a block to illustrate what you are pointing them to.

Creating a pseudo-module seems like a long way around the block to me.


So what you are saying I should just make that link face in my index and tell something about it? Or place it in a block and center that on my front page in the middle, instead of just a simple link in my modules section ?

Sorry for sounding a bit harsh but that way I do not want to represent a link to another site, and using Web_Links is also not desirable as it is our second clan page, yet has nothing to do with the main site.
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



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

PostPosted: Sat Feb 18, 2012 5:42 pm Reply with quote

Quote:
So what you are saying I should just make that link face in my index and tell something about it? Or place it in a block and center that on my front page in the middle, instead of just a simple link in my modules section ?


I was simply presenting an alternative. The block with the name of "modules" is kind of brain dead. Basically, it just does a file system read and lists all the files that are in your /nukeroot/modules directory. So, if you put a file there that has a redirect in it, it should work but it rather a long way round the barn, as I said.

You could even customize the coding in block-modules to "hard-code" a link to your Gallery without creating a separate module just to have a link. But go ahead with what you are doing and with what the others here are helping you with, it will work too.
 
View user's profile Send private message Visit poster's website
rjms







PostPosted: Sat Feb 18, 2012 5:50 pm Reply with quote

fkelly wrote:
You could even customize the coding in block-modules to "hard-code" a link to your Gallery without creating a separate module just to have a link.


And how would I go about doing that ?

If it works I'm glad Smile
 
rjms







PostPosted: Sat Feb 18, 2012 5:53 pm Reply with quote

And on top of that, I do not need a 'simple' redirect. I want one to open up in a new window or tab.

And as said earlier in the posts, PHP is always _SELF never _BLANK.
 
fkelly







PostPosted: Sat Feb 18, 2012 9:08 pm Reply with quote

If you want to put the link in block-modules.php, open the file up for editing. I am using the 2.5 released file in this example. At line 48 you see the beginning of a while loop that goes through the module file names. d

Code:
     while ($row3 = $db->sql_fetchrow($result3)) {


So if you want your link to be at the top of this list you would insert something like:

Code:
 $content .= '<li><a href="mysite.mygallery.com" target="blank"> MyGallery</a></li>';


You are thus putting it at the top of the unordered list (ul) code. But you could insert it into the $content variable anyplace you want,
 
rjms







PostPosted: Sun Feb 19, 2012 5:23 am Reply with quote

Allright added this into block-Modules.php at line 48 the while row starts with me on line 47 then uploaded it, force refreshed cache and nothing shows.

Code:


/* Now we make the Modules block with the correspondent links */

$content .= '<div class="' . $ListClass . ' block-modules"><ul class="rn-ul">
<li><a href="index.php">' . _HOME . '</a></li>';
$result3 = $db->sql_query('SELECT * FROM ' . $prefix . '_modules WHERE active=1 AND inmenu=1 ORDER BY custom_title ASC');
while ($row3 = $db->sql_fetchrow($result3)) {
$content .= '<li><a href="http://www.xdppxclan.co.uk" target="blank"> MineCraft Clan</a></li>';
    $groups = $row3['groups'];
    $m_title = stripslashes($row3['title']);
    $custom_title = $row3['custom_title'];
    $view = intval($row3['view']);
    $m_title2 = str_replace('_', ' ', $m_title);
    if (!empty($custom_title)) {
        $m_title2 = $custom_title;
    }
 
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Sun Feb 19, 2012 8:52 am Reply with quote

I would undo any changes and change the beginning from
Code:
$content .= '<div class="' . $ListClass . ' block-modules"><ul class="rn-ul">

<li><a href="index.php">' . _HOME . '</a></li>';

to
Code:
$content .= '<div class="' . $ListClass . ' block-modules"><ul class="rn-ul">

<li><a href="index.php">' . _HOME . '</a></li>
<li><a href="http://www.xdppxclan.co.uk" target="blank">MineCraft Clan</a></li>';
 
View user's profile Send private message Visit poster's website
rjms







PostPosted: Sun Feb 19, 2012 9:23 am Reply with quote

Does nothing Sad
 
rjms







PostPosted: Sun Feb 19, 2012 9:24 am Reply with quote

Not even link showing up Sad
 
rjms







PostPosted: Sun Feb 19, 2012 9:25 am Reply with quote

isn't there a cache cleaner on the RN admin section somewhere?
 
spasticdonkey







PostPosted: Sun Feb 19, 2012 9:50 am Reply with quote

not sure what is happening but try this version [ Only registered users can see links on this board! Get registered or login! ]

also make sure that block-Modules is being used and not block-nukeNAV
 
rjms







PostPosted: Sun Feb 19, 2012 10:12 am Reply with quote

ooh i think nukeNav is being used lol lemme try to switch
 
rjms







PostPosted: Sun Feb 19, 2012 10:13 am Reply with quote

how do I switch to modules? it's not in my modules list
 
rjms







PostPosted: Sun Feb 19, 2012 10:15 am Reply with quote

nvm found it ... and works like a charm Smile !!


Thanks for all the help guys/gals
 
spasticdonkey







PostPosted: Sun Feb 19, 2012 11:01 am Reply with quote

cool, glad you got it sorted. if you prefer the nukeNAV block the line you would be looking for is:

Code:
$content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><ul class="' . $ListClass . '"><li class="li-first"><a href="./">'._HOME."</a></li>\n";


change to:
Code:
$content = '<table border="0" cellpadding="0" cellspacing="0"><tr><td><ul class="' . $ListClass . '"><li class="li-first"><a href="./">'._HOME."</a></li>\n";

$content .= '<li class="li-even li-next"><a href="http://www.xdppxclan.co.uk" target="_blank">MineCraft Clan</a></li>\n";
$n++;
 
rjms







PostPosted: Sun Feb 19, 2012 11:13 am Reply with quote

nah i'll stay with the modules block... at least i can change that name to 'NAVIGATION' with nukeNAV i can't change it Smile thanks for the opportunity to change back though.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©