miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

Header/Footer templates for forum in iframe

 
 
Page  Page 2 of 2:  « Previous  1  2

Author Februs
Partaker
#16 | Posted: 29 Nov 2010 23:56 
Paul:
Yes, this is exactly what I meant. This code should be put straight in setup_options.php. I would still recommend to use if(isset($_GET['iframe'])) because it's more "polite" for PHP specially if you have all warnings turned on. If you just put if($_GET...) it means the script will compare the value of $_GET['var'] which is not always present, and will produce a Notice.

Actually, there are a lot of ways how could you trick different options on a certain condition :)
A while back I posted about how I wanted minibb to display a header and footer if not running in an iframe and made the modifications referred to above in regards to setting and passing an iframe variable. It worked well but I've now realised there is one area where it's not working correctly and that is if I do a search and either click one of the page numbers (if there are more than one page of results) or click on one of the search results.

I can see that bb_func_search.php and search.html are involved in the search routine but can't see how to correctly pass the iframe variable in this particular case. Can it be done?

Author Paul
Lead Developer 
#17 | Posted: 30 Nov 2010 05:57 
Sorry, without seeing a live example of what do you mean it's difficult to say what's up.

Author Februs
Partaker
#18 | Posted: 30 Nov 2010 10:13 
Paul:
Sorry, without seeing a live example of what do you mean it's difficult to say what's up.
I'm referring to my earlier posts in this thread ... my minibb software runs both integrated within another website as an iframe but also as a standalone site with a header and footer. In order to achieve this I used the following (based on your advice):


OK, I think I had misunderstood what was being suggested. Are you saying I should perhaps include something like:

if ($_GET["iframe"]) $indexphp='index.php?iframe=1&';
else
$indexphp='index.php?';


And presumably I'd also need to do the same for $startIndex, i.e.

if ($_GET["iframe"]) $startIndex='index.php?iframe=1';
else
if ($_GET["iframe"])
As I said this works well apart from the search screen when you click on a page number to bring up a particular set of results or click on the URL of one of the actual results. SO I was asking if there was a way of passing the iframe variable into the results of the search screen.

Author Paul
Lead Developer 
#19 | Posted: 1 Dec 2010 03:31 
Thanks for reminding.

When you mouse over the page number link, or just click it - do you see "?iframe=1&" statement inside of its URL?

So far I can't understand why it works so. Search script uses $indexphp setting in the same manner as all other scripts.

Author Februs
Partaker
#20 | Posted: 1 Dec 2010 11:58 
Paul:
Thanks for reminding.

When you mouse over the page number link, or just click it - do you see "?iframe=1&" statement inside of its URL?

So far I can't understand why it works so. Search script uses $indexphp setting in the same manner as all other scripts.
Just to summarise, I have the following within setup_options.php:

if (!isset($_REQUEST['iframe']
)) $indexphp='index.php?';
else
$indexphp='index.php?iframe=1&';
if ( (!isset($_REQUEST['iframe']
)) or ($_REQUEST['iframe'] != "1") ) $startIndex='index.php';
else
$startIndex='index.php?iframe=1';
The URL to the main site is:

index.php


Clicking the search button gives:

index.php?action=search


Following a search the URL is:

index.php?phrase=[searchterm]&action=search&searchGo=1&iframe=


Hovering over the page number on the search results screen gives:

index.php?iframe=1&action=search&phrase=[searchterm]&searchGo=1&page=[page num]


Hovering over a result on one of the search pages gives:

index.php?iframe=1&action=vthread&forum=[forum num]&topic=[topic num]


I have replaced the actual numerical data in the URLs above with a description within square brackets.


Not sure if the above info helps to point out where I've gone wrong.

Author Paul
Lead Developer 
#21 | Posted: 2 Dec 2010 03:37 
So it's fine, iframe var is passed correctly - what could be the problem then? Something in your internal code? I have no ideas.

Actually, I still don't understand what and where happens, may be the nature of the problem is on the other side. So finally, without seeing your exact URL, I can't tell what the problem is.

Author Februs
Partaker
#22 | Posted: 2 Dec 2010 10:26 
The iframe var isn't passed correctly, if you look at the various URLs I provided it's only after the search is run that the iframe var suddenly becomes 1, prior to that it is not set. It shouldn't be 1 as the example I'm quoting is for the standalone site which is not displayed within an iframe.

Page  Page 2 of 2:  « Previous  1  2 
Specific miniBB Support Forums / Specific /
 Header/Footer templates for forum in iframe
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑