Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

include problem

Asked Modified Viewed 2,734 times
S
Sladdaren
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
asked
Junior Member

Hi

Got a problem. I have a banner on the right side that i only want to show on my first page. I choose to include /news.php in that panel.
Problem is that i have a lot of news on my site. When i go to next page of news the banner shows anyways :(.
And when users want to READ MORE in the news panel the banner shows. I only want the banner to show at the first page.

My first page that i only want to show the banners www.volvosweden.se/news.php
when you read more news example, I dont want to show the banners: http://volvosweden.se/news.php?rowstart=3

I used this incl in the panel...I there any solutions?
dl.dropboxusercontent.com/u/757034/php%20fel/Image3.jpg
Edited by Sladdaren on 17-01-2017 17:29,
0 replies

12 posts

F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Do a manual include of the banner directly in the news between the following brackets.
if (!isset($_GET)) {
echo " should show on only first page ";
}
0 replies
S
Sladdaren
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

This could work:G if i get it to work..Im a bit nuub on this coding..But is it this how you mean?

Post a picture sry
dl.dropboxusercontent.com/u/757034/php%20fel/Image33.jpg


Or do i need to go into the news.php file and attach the code ?
Edited by Sladdaren on 21-01-2017 02:40,
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

yes place that code in news.php and have the banner code between brackets, that way it only shows on page 1.
0 replies
S
Sladdaren
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

I think im doing something wrong :|

I posted the code in news.php like this
require_once "maincore.php";
require_once THEMES."templates/header.php";
if (!isset($_GET)) {
echo "/news.php";
}

// Predefined variables, do not edit these values
$i = 0;

// Number of news displayed
$items_per_page = $settings['newsperpage'];


Should /news.php rewrite to "show only on first page" ?? or should it be a link http://volvosweden.se/news.php?

And in the panel code i write it like this...

dl.dropboxusercontent.com/u/757034/php%20fel/Image5.jpg


What am i doing wrong here:| ?
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Only use
if (!isset($_GET)) {
echo "Move your panel content here";
}


Do not include news.php, only inlcuide what you want displayed on first page only.
Do not use openside or close side. copy the content from the panel and echo the content between the GET brackets.
0 replies
S
Sladdaren
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

This is what ivé done
I open the news.php file in my ftp client and paste the code i got from Falk in the top of the news.php

require_once "maincore.php";
require_once THEMES."templates/header.php";
if (!isset($_GET)) {
echo "<center><table border='3' style='width:72%'>
  <tr>
    <td><center>bannertext <a href='bannerlink/'>bannerlink</a> en oberoende prisjämförelsetjänst på nätet.<center><a href='link><img src='bannerimage'></a></td>
  </tr></table>";
}
// Predefined variables, do not edit these values
$i = 0;


And i disable the panel
Now it should show the banner on my first page ( www..../news.php)
But i dont se the banner anyware?

Im hoping for more info on what could be wrong :|
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

You most likley have some GET triggered, but should not contain data unless a new page is triggered.
Try
if(empty($_GET)) { 

instead.
0 replies
S
Sladdaren
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

:G
I see it. But it placed in the center of the site now. Where should i place the code to get it in the left side?
Notice, that i dont have this code in a panel..only in news.php
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Simply use the code in the panel instead then.

if(empty($_GET)) {

panel content

}
0 replies
S
Sladdaren
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions
answered
Junior Member

ohh maaan :G i think you solved it for me :D Thank you Falk for your uber expertis help.

I posted the code in a new left panel.

if(empty($_GET)) {

echo "banner code";

}

I was have to use panel restriktions...include only in /news.php
The banner only shows now in my first page on the site. When i click the READ MORE on my news the banner is gone...jiippi i cant belive it :D
0 replies
F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

:G
0 replies
H
Homdax
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,247 posts on the community forums.
  • Started 108 threads in the forums
answered
Fusioneer

Glad you found a solution Sladdaren...
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 12 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
H
H
Homdax 10
  • Fusioneer, joined since
  • Contributed 2,247 posts on the community forums.
  • Started 108 threads in the forums
S
S
http://volvosweden.se - Forum för oss som kör Volvo
  • Junior Member, joined since
  • Contributed 28 posts on the community forums.
  • Started 9 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet