How do I omit the header in popups?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How do I omit the header in popups?
MarshallJen
CZ Newbie
MarshallJen has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jun 05, 2004
0.00 posts per day
Posts: 10
Points: 2,482
   
I've installed a mod on my forum where users can click the post count, and they get a popup shoing the poster and the number of posts.

I always get my overall site header showing and I can't for the life of me figure out how to stop it!

It gives the popup a scrollbar, and it looks stupid.

Does anyone know how I can omit the header in popup pages generated from the forum?

I'm using Php-nuke 7.3

Thanks a lot icon_biggrin.gif



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Its predefined allready for you you just need to add a little something to the url that is the poup. What url does the mod have in it for the popup?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
MarshallJen
CZ Newbie
MarshallJen has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jun 05, 2004
0.00 posts per day
Posts: 10
Points: 2,482
   
WOW from your advice i've almost sorted it!

The URL was [ Register or login to view links on this board. ]

I've changed it to:
[ Register or login to view links on this board. ]

And it's removed the header. Unfortunately it's also removed all formatting of the page, and now it's just black text on a blank page.

Is there anyway you can keep the theme of the site - just not the header?

Thanks so much,

Jennifer



Back to top Reply with quote
#4   
MarshallJen
CZ Newbie
MarshallJen has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jun 05, 2004
0.00 posts per day
Posts: 10
Points: 2,482
   
Please.. anyone? icon_cry.gif



Back to top Reply with quote
#5   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
There should be a function in the postings_popup which makes the poup page can you post that part please.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: How do I omit the header in popups?
MarshallJen
CZ Newbie
MarshallJen has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jun 05, 2004
0.00 posts per day
Posts: 10
Points: 2,482
   
I'm not sure which part you need, so this is the complete postings_popup.php file:

<?php

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
if ($popup != "1"){
    $module_name = basename(dirname(__FILE__));
    require("modules/".$module_name."/nukebb.php");
}
else
{
    $phpbb_root_path = 'modules/Forums/';
   $phpbb_root_test = '';
}

define('IN_PHPBB', true);
//$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);


// Start initial var setup
//
$topic_id = intval($HTTP_GET_VARS[t]);

// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX , $nukeuser);
init_userprefs($userdata);
//
// End session management

// Load templates
//
$page_title = "Number of Posts";
$template->set_filenames(array(
   'body' => 'postings_popup.tpl')
);

// Send vars to template
//
$template->assign_vars(array(
   'PAGE_TITLE' => $page_title,
   'L_CLOSE_WINDOW' => "<a href='javascript:window.close();'>".$lang['Close_window']."</a>",
   'L_TOTAL_POSTS' => $lang['Total_posts'],
   'L_USER' => $lang['Poster'],
   'L_POSTS' => $lang['Posts'],
   'L_AUTHOR' => $lang['Author'],
   
   'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
   'T_BODY_LINK' => '#'.$theme['body_link'],
   'T_BODY_HLINK' => '#'.$theme['body_hlink'],
   'T_TR_COLOR1' => '#'.$theme['tr_color1'],
   'T_TR_COLOR3' => '#'.$theme['tr_color3'],
   'T_TH_COLOR2' => '#'.$theme['th_color2'],
   'T_TD_COLOR2' => '#'.$theme['td_color2'],
   'T_FONTFACE1' => $theme['fontface1'],
   'T_FONTSIZE1' => $theme['fontsize1'],
   'T_FONTSIZE2' => $theme['fontsize2'],
   'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
   )
);

//
// Process the data
// Find who started the topic
$sql = "SELECT t.*
   FROM " . TOPICS_TABLE . " t
   WHERE t.topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$starter = $row['topic_poster'];

// Find the total number of posts
$sql = "SELECT p.*
   FROM " . POSTS_TABLE . " p
   WHERE p.topic_id = $topic_id
   ORDER BY p.poster_id";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}

$total_topics = 0;
while( $row = $db->sql_fetchrow($result) )
{
   $topic_rowset[] = $row;
   $total_topics++;
}

// Find the number of posts for each user
for($i = 0; $i < $total_topics; $i++)
{
   $poster_id = $topic_rowset[$i]['poster_id'];
   if($poster_id != $poster_id2)
   {
      $flag = '   ';
      if($poster_id == $starter)
      {
         $flag = '* ';
      }
      $sql = "SELECT p.topic_id, u.username
         FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
         WHERE p.topic_id = $topic_id
         AND p.poster_id = $poster_id
         AND u.user_id = $poster_id";
      if ( !($result = $db->sql_query($sql)) )
      {
          message_die(GENERAL_ERROR, 'Could not obtain poster information', '', __LINE__, __FILE__, $sql);
      }

      $posts = $db->sql_numrows($result);
      $row = $db->sql_fetchrow($result);
      $poster = $flag.$row['username'];
      $poster_id2 = $poster_id;

      $template->assign_block_vars('topicrow', array(
         'POSTER' => $poster,
         'POSTS' => $posts)
      );

      $template->assign_vars(array(
         'TOTAL_TOPICS' => $total_topics)
      );
   }
}

$template->pparse('body');

?>



Back to top Reply with quote
#7   re: How do I omit the header in popups?
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Place this right before the $page_title

$gen_simple_header = TRUE;


See if that helps.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   
MarshallJen
CZ Newbie
MarshallJen has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jun 05, 2004
0.00 posts per day
Posts: 10
Points: 2,482
   
I'm afraid that didn't work. Are there any other files that use gen_simple_header that I could look at? It might be in the wrong place or something?

Thanks

Jen



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum