Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2009, 09:19 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Go To Popup in Navigation not showing (vB custom page in poup window)

Hi folks,

hope that someone can point me to the right direction.

I have a popup window spawned from within a vB page that loads a custom vB-page. The framework is all there (global.php), and I have used this design many times before. only difference: now I do not show the navbar, perhaps this is the problem.

I have database results on that external page, nicely paginated all over. Pagination looks good, and from the look on the html source in my browser it's all there. Only thing missing: The Go to popup. The space for it is there (one can see that there is an empty <td> there, and it's in the code). But already the pointer is missing that one clicks to open the popup.

I already pasted
Code:
<!-- PAGENAV POPUP -->
    <div class="vbmenu_popup" id="pagenav_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
            <td class="thead" nowrap="nowrap">Gehe zu...</td>
        </tr>
        <tr>
            <td class="vbmenu_option" title="nohilite">
            <form action="index.php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
                <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
                <input type="button" class="button" id="pagenav_ibtn" value="Los" />
            </form>
            </td>
        </tr>
        </table>
    </div>
<!-- / PAGENAV POPUP -->
at the end of my page, but that did change nothing. Well, after all, on other pages I designed that have pagination I never had to put that code...

Any hints?
Reply With Quote
  #2  
Old 01-22-2009, 04:04 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No ideas?
Reply With Quote
  #3  
Old 01-22-2009, 05:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a Go To button in the popup window that isn't there? I don't understand what or where the something isn't working.

You said "The space for it is there (one can see that there is an empty <td> there, and it's in the code)." So, let's see the page source for that and let's see the actual code for that.
Reply With Quote
  #4  
Old 01-22-2009, 07:41 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, here we go:
Output-Source:
HTML Code:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px; margin-top: 0;">
<tr valign="bottom">
    <td class="smallfont">&nbsp;</td>
    <td align="right"><div class="pagenav" align="right">
<table class="tborder" cellpadding="3" cellspacing="1" border="0">
<tr>
    <td class="vbmenu_control" style="font-weight:normal">Seite 1 von 3</td>
    
    
        <td class="alt2"><span class="smallfont" title="Zeige Ergebnis 1 bis 9 von 25"><strong>1</strong></span></td>
 <td class="alt1"><a rel="nofollow" class="smallfont" href="photo_popup.php?ins=link_thumb_2_orig&amp;alb=549&amp;prod=2&amp;cp=2&amp;page=2" title="Zeige Ergebnis 10 bis 18 von 25">2</a></td><td class="alt1"><a rel="nofollow" class="smallfont" href="photo_popup.php?ins=link_thumb_2_orig&amp;alb=549&amp;prod=2&amp;cp=2&amp;page=3" title="Zeige Ergebnis 19 bis 25 von 25">3</a></td>
    <td class="alt1"><a rel="next" class="smallfont" href="photo_popup.php?ins=link_thumb_2_orig&amp;alb=549&amp;prod=2&amp;cp=2&amp;page=2" title="N?chste Seite - Ergebnis 10 bis 18 von 25">&gt;</a></td>
    
    <td class="vbmenu_control" title="photo_popup.php?ins=link_thumb_2_orig&amp;alb=549&amp;prod=2&amp;cp=2"><a name="PageNav"></a></td>
</tr>
</table>
</div></td>
</tr>
</table>
I do know that the <td>>/td>-Tags are supposed to be empty - at least there are in the other sites too. I looked at quite some of them, but did not get any further. Looking at some of the "suspicious" files in includes didn' help, either.

PHP-Code:
PHP Code:
$perpage $vbulletin->input->clean_gpc('r''perpage'TYPE_UINT);
$pagenumber $vbulletin->input->clean_gpc('r''pagenumber'TYPE_UINT);
sanitize_pageresults($counter['fotos'], $pagenumber$perpage100$num_total);
$limitlower = ($pagenumber 1) * $perpage 1;
$limitupper $pagenumber $perpage;
if (
$limitupper $counter['fotos'])
{
    
$limitupper $counter['fotos'];
    if (
$limitlower $counter['fotos'])
    {
        
$limitlower $counter['fotos'] - $perpage;
    }
}
if (
$limitlower <= 0)
{
    
$limitlower 1;
}
if (empty (
$userfilter))
{
    
$pagenav construct_page_nav($pagenumber$perpage$counter['fotos'], "photo_popup.php?" $url_get_string $vbulletin->session->vars['sessionurl']); 
As I said: The pagination itself works perfectly well. Only the Popup doesn't.

Screenshot attached. One can see the pagination, at the right corner the space of the empty td is clearly visible.

The framework of the page is as follows:
PHP Code:
// ### Initiate vB Backend ###
error_reporting(E_ALL & ~ E_NOTICE);
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''photo_popup');
// change this depending on your filename
$phrasegroups = array('GLOBAL''album');
$globaltemplates = array('photo_popup');
require_once (
'./global.php');

### My Code ###

eval ('print_output("' fetch_template('photo_popup') . '");'); 
Whatever else might be needed to resolve this - just name it, I'll try to deliver

Thanks for your help, it's very much appreciated.
Attached Images
File Type: png screen_popup_1-3.png (17.6 KB, 0 views)
Reply With Quote
  #5  
Old 01-22-2009, 08:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, this is your blank empty td from the source, right?
HTML Code:
    <td class="vbmenu_control" title="photo_popup.php?ins=link_thumb_2_orig&amp;alb=549&amp;prod=2&amp;cp=2"><a name="PageNav"></a></td>
It looks to me like you have the title of the <td> tag incorrect - it's a link. I'm guessing that is not what you really want and that you want that link in the <a> tag
Reply With Quote
  #6  
Old 01-23-2009, 04:34 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see - but that code does not originate from me - it's vB's own.

This is what's in my template:
HTML Code:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px; margin-top: 0;">
<tr valign="bottom">
    <td class="smallfont">&nbsp;</td>
    <if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
The td and link come from the pagenav template (right at the end), which is completely unchanged in my testboard:
HTML Code:
    <if condition="$show['popups']"><td class="vbmenu_control" title="$address$address2"><a name="PageNav"></a></td></if>
</tr>
</table>
</div>
And the td looks just the same in standard vB paginations. This is from standard forumdisplay:
HTML Code:
<td class="vbmenu_control" title="forumdisplay.php?f=21&amp;order=desc"><a name="PageNav"></a></td>
The drop-arrow image seems to be added by script, it is not by css (or at least not that I see). In AdminCP you find this
HTML Code:
/* ***** basic styles for multi-page nav elements */
.pagenav a { text-decoration: none; }
.pagenav td { padding: 2px 4px 2px 4px; }
and that's all I could find for .pagenav a in the vB css-files, too.

The script that does pagination seems to be
HTML Code:
<script type="text/javascript" src="clientscript/vbulletin_menu.js?v=380"></script>
which is properly called in the head of my popup.

I even am quite sure I have identified the part of code that adds the image, but why it doesn't show up escapes me
Reply With Quote
  #7  
Old 01-25-2009, 08:10 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump.
Reply With Quote
  #8  
Old 01-25-2009, 04:05 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I still don't fully understand what the problem is, but..... perhaps you are missing the function that is needed? Have you tried including/requiring some other scripts in your page to see if that fixes the issue?
Reply With Quote
  #9  
Old 01-25-2009, 04:20 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm, those javascripts and stylesheets are called:
HTML Code:
<!-- CSS Stylesheet -->
<style type="text/css" id="vbulletin_css">
/**
* vBulletin 3.8.0 CSS
* Style: 'Rom-Forum 2'; Style ID: 3
*/
@import url("clientscript/vbulletin_css/style-f93e095c-00003.css");
</style>
<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_important.css?v=380" />

<!-- / CSS Stylesheet -->

<script type="text/javascript" src="clientscript/yui/yahoo-dom-event/yahoo-dom-event.js?v=380"></script>
<script type="text/javascript" src="clientscript/yui/connection/connection-min.js?v=380"></script>
<script type="text/javascript">
<!--
var SESSIONURL = "";
var SECURITYTOKEN = "1232907401-65ec3d17d2f5529672168f47cdfb6d8b7bb67fbd";
var IMGDIR_MISC = "http://www.roma-antiqua.de/forum/images/ra_misc";
var vb_disable_ajax = parseInt("0", 10);
// -->
</script>
<script type="text/javascript" src="clientscript/vbulletin_global.js?v=380"></script>
<script type="text/javascript" src="clientscript/vbulletin_menu.js?v=380"></script>

<link rel="alternate" type="application/rss+xml" title="Rom-Forum - Reise-Tipps & mehr RSS Feed" href="external.php?type=RSS2" />
  
<link rel="SHORTCUT ICON" href="/favicon.ico">
<link rel="STYLESHEET" type="text/css" href="/css/romaantiqua.css" />
<link rel="STYLESHEET" type="text/css" href="/css/menu.css" />

<script type="text/javascript">
function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {
    var iframeElement = document.getElementById
(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 'px';
    iframeElement.style.width = iframeWindow.document.width + 'px';
  }
  else if (document.all) {
    var iframeElement = document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat')
    {
      iframeElement.style.height =
iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
      iframeElement.style.width =
iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
    }
    else {
      iframeElement.style.height =
iframeWindow.document.body.scrollHeight + 15 + 'px';
      iframeElement.style.width =
iframeWindow.document.body.scrollWidth + 15 + 'px';
    }
  }
}
</script>
<script language="JavaScript" type="text/javascript">
    function thumbpaste (codehtml, codebb) 
    {
        if (window.opener.vB_Editor['vB_Editor_QE_1'].wysiwyg_mode)
        {        
            window.opener.vB_Editor['vB_Editor_QE_1'].insert_text(codehtml);
window.opener.vB_Editor['vB_Editor_QE_1'].collapse_selection_end();
        }
        else
        {
            window.opener.vB_Editor['vB_Editor_QE_1'].insert_text(codebb);
window.opener.vB_Editor['vB_Editor_QE_1'].collapse_selection_end();
        }
        return;
    }
</script>
<script language="JavaScript" type="text/javascript">
    var editorsubmit = window.opener.document.getElementById('vB_Editor_QE_1_save');
    function fnCallback(e) { self.close(); }
    YAHOO.util.Event.addListener(editorsubmit, "click", fnCallback);
</script>
<script language="JavaScript" type="text/javascript">
    function copyclip (codehtml, codebb)
    {
        code = ;
        document.getElementById('codebox').value = code;
        clipboardData.setData('text', code);
    }
</script>
What I require in the php-script I already posted. I just cannot think what else I could include. Do you have any hints what I might try?
Reply With Quote
  #10  
Old 01-25-2009, 04:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm talking about including/requiring certain scripts in your php code, not the html output.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 09:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08439 seconds
  • Memory Usage 2,335KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (8)bbcode_html
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete