vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Go To Popup in Navigation not showing (vB custom page in poup window) (https://vborg.vbsupport.ru/showthread.php?t=202547)

cellarius 01-21-2009 09:19 AM

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?

cellarius 01-22-2009 04:04 PM

No ideas?

Lynne 01-22-2009 05:43 PM

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.

cellarius 01-22-2009 07:41 PM

1 Attachment(s)
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.

Lynne 01-22-2009 08:10 PM

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

cellarius 01-23-2009 04:34 AM

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 :(

cellarius 01-25-2009 08:10 AM

bump.

Lynne 01-25-2009 04:05 PM

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?

cellarius 01-25-2009 04:20 PM

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?

Lynne 01-25-2009 04:22 PM

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

cellarius 01-25-2009 05:40 PM

I know - I just thought to give additional input, since the menu requires js, too, doesn't it?
As I wrote: what i'm requiring in the php code I already statet in this post, third code block there. As I said, I'm at a loss what else might even be worth requiring, and would be grateful for suggestions.

Lynne 01-25-2009 05:52 PM

1 Attachment(s)
Is this the little thing you are missing? On this site, the code for it shows up in the footer. Are you using a standard footer template? Is the code for it there in the footer?
Attachment 93477

cellarius 01-25-2009 06:44 PM

Yes, that's exactly what's missing. And I have this code in my template - that's in the page footer normally, yes.

Quote:

Originally Posted by cellarius (Post 1719905)
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 -->


But that's only the code for the popup itself, isn't it? I don't even see the arrow to click to oben the popup...

--------------- Added [DATE]1232916426[/DATE] at [TIME]1232916426[/TIME] ---------------

P.S.: I you have the time and want to, I'd sent you access data to my forum, so you can have a look. That might be simpler than my humble explaining...

Lynne 01-25-2009 08:31 PM

Well, all I would do is find a page on vb.org that has that popup and then compare the html in that page to the html in your page. Or, in the case of the php part of the page, compare the working to non-working page and you are more capable of doing those comparisons than I since you have all the files.

cellarius 01-26-2009 06:15 AM

You're perfectly right, and though I did that about 200 times (at least it feels like that...) I always missed that oh so simple snippet of code right at the end:

HTML Code:

<script type="text/javascript">
<!--
    // Main vBulletin Javascript Initialization
    vBulletin_init();
//-->

</script>

Everything was there all the time - I just forgot to start the engine :o

If anybody should ever be so stupid, too, I thought I share the solution to the mystery :)

Thanks for your patience and help - what an emerassement this thread is (for me of course) :o:rolleyes:

Lynne 01-26-2009 03:04 PM

Oh wow. Amazing how a couple of lines can spoil the whole page! All that time spent.... but hey, now ya know!

Glad you got it figured out.


All times are GMT. The time now is 11:25 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.01680 seconds
  • Memory Usage 1,831KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (9)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete