Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 57
0 members and 57 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
The Lyric Archive
Dining Room Furniture

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - Blocks

Reply
 
LinkBack Thread Tools Display Modes
Can one single block display modules and content?
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 2
Join Date: Oct 2004
Can one single block display modules and content? - 10-22-2004, 08:18 PM

First I'd just like to say, this is a great website. Everyone involved should be proud.

Now my question:

Is it possible to have one block that can list both, all active modules and all content.

It seems to me that it isn't possible, I've tried everything that I can possibly think of to get this to fly.

If anyone has any suggestions or pointers, it would be greatly appreciated.

Thanks

Aaron
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Moderator
 
Status: Offline
Posts: 260
Join Date: Oct 2004
10-23-2004, 06:39 AM

open block-modules.php
before the
Code:
 ?>
add
Code:
$content .= "<a href=\"myweblinkhere\">myweblinktitlehere</a>";
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 2
Join Date: Oct 2004
10-23-2004, 01:09 PM

Thanks for the quick response. I'll give that a try when I get home from work tonight. 8)

Much appreciated

EDIT: Worked like a charm, thanks again! :wink:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Junior Member
 
Status: Offline
Posts: 12
Join Date: Nov 2004
12-02-2004, 11:18 PM

mmm i cant get it to work. i also have a few other questions. its there a way you can place it in a certain place on the block? like if wanted to put it at the top. how would i do that? and how would i write stuff in there to seperate it like in the navigation block on http://www.skyracing.mxadrenaline.com/ that site.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Junior Member
 
Status: Offline
Posts: 7
Join Date: Nov 2004
12-22-2004, 09:51 AM

I dont get what this was meant to doo.. i did it anywyas because another question i needed showed me this link.. now when i log into the cppanel of my site, i get that line ontop of my main navigation block.

Q - What was that added line meant to doo? and how do i see if it has worked?

EDIT: well i thought that it might have worked but it didnt, instead i had a part of the line being wrote above my no1 navigation block --> $content "...", and now i cant get rid of the line.

Q - How do i get this to work and how do i take it off.? btw when i click on it it says... "HTTP Error Page cannot be found etc etc.." my site = www.ed-clan.co.uk, can somebody check it please and tell me what i have done wrong and how i can correct it thanks.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
12-22-2004, 12:59 PM

Quote:
Originally Posted by GuMmO
I dont get what this was meant to doo.. i did it anywyas because another question i needed showed me this link.. now when i log into the cppanel of my site, i get that line ontop of my main navigation block.

Q - What was that added line meant to doo? and how do i see if it has worked?

EDIT: well i thought that it might have worked but it didnt, instead i had a part of the line being wrote above my no1 navigation block --> $content "...", and now i cant get rid of the line.

Q - How do i get this to work and how do i take it off.? btw when i click on it it says... "HTTP Error Page cannot be found etc etc.." my site = www.ed-clan.co.uk, can somebody check it please and tell me what i have done wrong and how i can correct it thanks.
How in the heck did you manage that?

Reverse what you did to get rid of it.

You need to open the
blocks/blocks-Modules.php file
Just after this code you add that links you want

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

    $content .= "<big>&middot;</big><a href=\"index.php\">"._HOME."</a>
\n";
    $result3 = $db->sql_query("SELECT title, custom_title, view FROM " . $prefix . "_modules WHERE active='1' AND title!='$def_module' AND inmenu='1' ORDER BY custom_title ASC");
    while ($row3 = $db->sql_fetchrow($result3)) {
	$m_title = stripslashes($row3['title']);
	$custom_title = $row3['custom_title'];
	$view = intval($row3['view']);
	$m_title2 = ereg_replace("_", " ", $m_title);
	if ($custom_title != "") {
	    $m_title2 = $custom_title;
	}
	if ($m_title != $main_module) {
	    if ((is_admin($admin) AND $view == 2) OR $view != 2) {
		$content .= "<big>&middot;</big><a href=\"modules.php?name=$m_title\">$m_title2</a>
\n";
so it would look like this

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

    $content .= "<big>&middot;</big><a href=\"index.php\">"._HOME."</a>
\n";
    $result3 = $db->sql_query("SELECT title, custom_title, view FROM " . $prefix . "_modules WHERE active='1' AND title!='$def_module' AND inmenu='1' ORDER BY custom_title ASC");
    while ($row3 = $db->sql_fetchrow($result3)) {
	$m_title = stripslashes($row3['title']);
	$custom_title = $row3['custom_title'];
	$view = intval($row3['view']);
	$m_title2 = ereg_replace("_", " ", $m_title);
	if ($custom_title != "") {
	    $m_title2 = $custom_title;
	}
	if ($m_title != $main_module) {
	    if ((is_admin($admin) AND $view == 2) OR $view != 2) {
		$content .= "<big>&middot;</big><a href=\"modules.php?name=$m_title\">$m_title2</a>
\n";
		$content .= "<big>&middot;</big><a href=\"http://www.yourlink.com\">YOURLINK</a>
\n";
notice the line I added?
Code:
		$content .= "<big>&middot;</big><a href=\"http://www.yourlink.com\">LINKNAME</a>
\n";
you can modify that line with your yourlink.com and your LINKNAME.

Now, if you want all your Content pages displayed in teh Modules block, you can simply copy the Content blocks coe to the Modules block code like this: SAme code as above, instead of adding that one line I'll add the entire Content block code so the Modules block will also display all the Content pages.

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

    $content .= "<big>&middot;</big><a href=\"index.php\">"._HOME."</a>
\n";
    $result3 = $db->sql_query("SELECT title, custom_title, view FROM " . $prefix . "_modules WHERE active='1' AND title!='$def_module' AND inmenu='1' ORDER BY custom_title ASC");
    while ($row3 = $db->sql_fetchrow($result3)) {
	$m_title = stripslashes($row3['title']);
	$custom_title = $row3['custom_title'];
	$view = intval($row3['view']);
	$m_title2 = ereg_replace("_", " ", $m_title);
	if ($custom_title != "") {
	    $m_title2 = $custom_title;
	}
	if ($m_title != $main_module) {
	    if ((is_admin($admin) AND $view == 2) OR $view != 2) {
		$content .= "<big>&middot;</big><a href=\"modules.php?name=$m_title\">$m_title2</a>
\n";

$result = $db->sql_query("SELECT pid, title FROM " . $prefix . "_pages WHERE active='1'");
while ($row = $db->sql_fetchrow($result)) {
$pid = intval($row['pid']);
$title = stripslashes($row['title']);
    $content .= "<big>&middot;</big><a href=\"modules.php?name=Content&amp;pa=showpage&amp;pid=$pid\">$title</a>
";
}
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display a block in all pages Astroman Nuke 7.x - General 2 04-22-2005 03:45 PM
Donation block How To make it to display names killerbee Site design 3 01-21-2005 08:14 AM
Disabling Inactive modules in modules block Krutch Nuke 7.x - Modules 2 12-14-2004 11:43 AM
More Content Modules? Kristic Nuke 6.5 to 6.9 - Modules 2 08-05-2003 02:28 AM
Display Avatar User Menu Block for PHP-Nuke 6.5 Peer Nuke 6.5 to 6.9 - Blocks 22 04-18-2003 06:46 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31