Author |
Message |
rjms
Regular


Joined: Feb 10, 2012
Posts: 56
|
Posted:
Sat Feb 18, 2012 5:24 pm |
|
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. |
|
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Sat Feb 18, 2012 5:42 pm |
|
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. |
|
|
|
 |
rjms

|
Posted:
Sat Feb 18, 2012 5:50 pm |
|
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  |
|
|
|
 |
rjms

|
Posted:
Sat Feb 18, 2012 5:53 pm |
|
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

|
Posted:
Sat Feb 18, 2012 9:08 pm |
|
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

|
Posted:
Sun Feb 19, 2012 5:23 am |
|
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
|
Posted:
Sun Feb 19, 2012 8:52 am |
|
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>';
|
|
|
|
|
 |
rjms

|
Posted:
Sun Feb 19, 2012 9:23 am |
|
Does nothing  |
|
|
|
 |
rjms

|
Posted:
Sun Feb 19, 2012 9:24 am |
|
Not even link showing up  |
|
|
|
 |
rjms

|
Posted:
Sun Feb 19, 2012 9:25 am |
|
isn't there a cache cleaner on the RN admin section somewhere? |
|
|
|
 |
spasticdonkey

|
Posted:
Sun Feb 19, 2012 9:50 am |
|
|
|
 |
rjms

|
Posted:
Sun Feb 19, 2012 10:12 am |
|
ooh i think nukeNav is being used lol lemme try to switch |
|
|
|
 |
rjms

|
Posted:
Sun Feb 19, 2012 10:13 am |
|
how do I switch to modules? it's not in my modules list |
|
|
|
 |
rjms

|
Posted:
Sun Feb 19, 2012 10:15 am |
|
nvm found it ... and works like a charm !!
Thanks for all the help guys/gals |
|
|
|
 |
spasticdonkey

|
Posted:
Sun Feb 19, 2012 11:01 am |
|
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

|
Posted:
Sun Feb 19, 2012 11:13 am |
|
nah i'll stay with the modules block... at least i can change that name to 'NAVIGATION' with nukeNAV i can't change it thanks for the opportunity to change back though. |
|
|
|
 |
|