Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Dont work on QueryString based sites?
Linces
Posted on 18 Mar 2011, 04:25:07

Access: Member
Total Posts: 3
Joined: 2011-03-17

Hello,

I have a querystring based site, then when i pretend to open a file, products.php for example , i call this way:

http://www.delphifontes.com.br/?pagina=products

?pagina=products // call the file products.php

Here is the problem..

When i call the news page via querystring, the news dont show correctly, see yourself:
http://www.delphifontes.com.br/?pagina=dicas

When i call the news page via normal way, the news show perfectly, see yourself:
http://www.delphifontes.com.br/includes/dicas.php

Please, i really need this working, i lost my mind trying to solve this.

Can i help me?

Sorry my poor english
#3361
Last edited by Linces at 2011-03-18 13:16:33 Reason: wrong link in text
Chris
Posted on 18 Mar 2011, 10:29:44

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I'm assuming you're trying to do something like this

Code:
<?php
include 'includes/?pagina=dicas';
?>


Which won't work. I can't really tell you how to fix this without seeing the code you're using to try make it work.
#3364
Linces
Posted on 18 Mar 2011, 13:02:19

Access: Member
Total Posts: 3
Joined: 2011-03-17

Here is the code of my querystring function:

in my functions.php i have:

Code:

<?php
   
   
//CRIA UMA FUNÇÃO
   
function QueryString(&$get, $inicio, $pasta){
         
//verifica se $get existe
         
$get = (isset($get)) ? $get : '';
         
//remove os espaços antes e depois da string
         
$get = trim($get);
         
//remove tag php e html
         
$get = strip_tags($get);
        
         
//verifica se está vazio
         
if(empty($get)){
            include(
"$pasta/$inicio");
         }
         
//verifica se existe algum desses caracteres
         
elseif(eregi("http|www|.php|.asp|.net|.gif|.exe|.jpg|./", $get)){
            include(
"$pasta/$inicio");
         }
         
//verifica se o arquivo não existe
         
elseif(!file_exists("$pasta/$get.php")){
            include(
"$pasta/$inicio");
         }else{
         
//passando pelas verificações, ele dá o include
             
include("$pasta/$get.php");
         }
   }

?>


in "my" index.php "not in index.php of n-13 news" i have:

Code:

<?php    
    ob_start
();
    include_once(
"funcoes/functions.php");

        @
$local = $_REQUEST['caminho']; 



        if (
$local == "" ) 

        {
$pasta = "includes"; // default directory of the files

        
}

        elseif (
$local !== "")

        {
$pasta = $local; // force another directory

        
}

        else {
$pasta = "includes";

        }

        
QueryString($_GET['pagina'], "home.php", $pasta);

    
?>


Then finally in my "index.php" i call any file, this way:

<a href="?pagina=dicas">Dicas / Artigos</a>

The in "dicas" .php i have the code wich call the index.php in n13-news directory, this way:

<?php
include "n13/index.php";
?>



#3368
Chris
Posted on 21 Mar 2011, 13:13:36

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I think what you're looking for is the $linkprefix variable


Code:
<?php
$linkprefix 
= 'pagina=products&';
include 
'news/index.php';
?>


This will append 'variable=value&' to the URLs to full the full news article, for example this

http://www.delphifontes.com.br/?pagina=products

Would become this

http://www.delphifontes.com.br/?pagina=products&id=1

Documentation here: http://code.google.com/p/n-13news/wiki/Integration
#3374
Linces
Posted on 22 Mar 2011, 18:09:26

Access: Member
Total Posts: 3
Joined: 2011-03-17

Crhis, Thanks. Almost done now ..

Now, in details page about the news, I got the following problem.

Are not displayed {shortstory}, {story}, and [readmore]

See in this link: http://www.delphifontes.com.br/?pagina=index&caminho=n13&id=2

Thank you again.
#3376
Network-13.com © 2013