Jump to content

Wanted Beta Testers - Page Manager Module


Recommended Posts

  • 3 weeks later...
  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

This is the best mod ever as I can now do extra page in full php code and it works,

 

Here is one I did:

 

RSS feed for product's place all the code in the Smartyvalues: box only

 

include("configuration.php");

// Insert here the the title of your feed
$rss_title= "RSS feed"; 
// Insert your site, in the format site.com
$rss_site= "site.com" ;
// Insert the description of your website
$rss_description= "Description of your RSS feed";
// Applicable language of the feed. For spanish, change to "es"
$rss_language="en";                    
// Address of the logo file. It can be called whatever you want it to be!
$rss_logo="http://www.".$rss_site."/images/rss.gif"; 
// the feed's author email
$emailadmin="your@emailaddress.com";  

// set the file's content type and character set
// this must be called before any output
header("Content-Type: text/xml;charset=utf-8");


// Open the database

mysql_connect($db_host,$db_username,$db_password);
   @mysql_select_db($db_name) or die("Unable to select DB");

// Select all the records from the Articles/Blog table - whatever you're using it for

$query = "
Select
   tblproducts.`id`,
   tblproducts.`type`,
   tblproducts.`gid`,
   tblproducts.`name`,
   tblproducts.`description`,
   tblproducts.`hidden`,
   tblproducts.`showdomainoptions`,
   tblproducts.`welcomeemail`,
   tblproducts.`stockcontrol`,
   tblproducts.`qty`,
   tblproducts.`proratabilling`,
   tblproducts.`proratadate`,
   tblproducts.`proratachargenextmonth`,
   tblproducts.`paytype`,
   tblproducts.`subdomain`,
   tblproducts.`autosetup`,
   tblproducts.`servertype`,
   tblproducts.`defaultserver`,
   tblproducts.`configoption1`,
   tblproducts.`configoption2`,
   tblproducts.`configoption3`,
   tblproducts.`configoption4`,
   tblproducts.`configoption5`,
   tblproducts.`configoption6`,
   tblproducts.`configoption7`,
   tblproducts.`configoption8`,
   tblproducts.`configoption9`,
   tblproducts.`configoption10`,
   tblproducts.`configoption11`,
   tblproducts.`configoption12`,
   tblproducts.`configoption13`,
   tblproducts.`configoption14`,
   tblproducts.`configoption15`,
   tblproducts.`configoption16`,
   tblproducts.`configoption17`,
   tblproducts.`configoption18`,
   tblproducts.`configoption19`,
   tblproducts.`configoption20`,
   tblproducts.`configoption21`,
   tblproducts.`configoption22`,
   tblproducts.`configoption23`,
   tblproducts.`configoption24`,
   tblproducts.`freedomain`,
   tblproducts.`freedomainpaymentterms`,
   tblproducts.`freedomaintlds`,
   tblproducts.`upgradepackages`,
   tblproducts.`configoptionsupgrade`,
   tblproducts.`billingcycleupgrade`,
   tblproducts.`tax`,
   tblproducts.`affiliateonetime`,
   tblproducts.`affiliatepaytype`,
   tblproducts.`affiliatepayamount`,
   tblproducts.`downloads`,
   tblproducts.`order`,
   tblproductgroups.`id`,
   tblproductgroups.`name` As `groups name`,
   tblproductgroups.`disabledgateways`,
   tblproductgroups.`hidden`,
   tblproductgroups.`order`,
   tblpricing.`id`,
   tblpricing.`type`,
   tblpricing.`currency`,
   tblpricing.`relid`,
   tblpricing.`msetupfee`,
   tblpricing.`qsetupfee`,
   tblpricing.`ssetupfee`,
   tblpricing.`asetupfee`,
   tblpricing.`bsetupfee`,
   tblpricing.`monthly`,
   tblpricing.`quarterly`,
   tblpricing.`semiannually`,
   tblpricing.`annually`,
   tblpricing.`biennially`
From
(tblproducts tblproducts LEFT OUTER JOIN tblproductgroups tblproductgroups ON (tblproducts.gid = tblproductgroups.id)) LEFT OUTER JOIN tblpricing tblpricing ON (tblpricing.relid = tblproducts.id)
Where
    ( tblproductgroups.hidden <> 'on' )
   And ( tblpricing.`currency` = 1 )
   And ( tblpricing.type = 'product' )
Order by
   tblproductgroups.id Asc
" ;
$result = mysql_query($query) or die("Query failed") ;

$num_rows = mysql_num_rows($result);
echo
'<?xml version="1.0" encoding="utf-8" ?>

   <channel>
     <title>'.$rss_title.'</title>
     <link>http://www.'.$rss_site.'</link>
     <description>'.$rss_description.'</description>';


for($i=0;$i<$num_rows; $i++) //will loop through x times to generate x RSS items
{



   $title = mysql_result($result,$i,'name'); //subject line for the RSS item

   // Pass the record URL_product to the variable $url_product. It also
   // has to include the relative path, like in: "path/product1.htm"
   $productinfopid = mysql_result($result,$i,'id');
   $url_product = '/cart.php?a=add&pid='.$productinfopid.''; //define the URL of where people could read this blog/article entry
   $url_product_image = '/templates/new_portal/images/products/'.$productinfopid.'.jpg'; //define the URL of where people could read this blog/article entry

   // Define a description of the item

   $description = mysql_result($result,$i,'description'); //easiest way is by grabbing the content

   // Clean the description

   $description = str_replace ("&","",htmlspecialchars(strip_tags($description)));
   $description = str_replace ("nbsp;","",htmlspecialchars(strip_tags($description)));

   //This is a teaser of your article, basically what RSS readers will show the user in their inbox. 
   //This is how you entice users to come over and read the full article

   //the easiest way is to just take the first few hundred characters of the content (description)

   $short_description = substr($description,0,50) . "...";

   $mygid = mysql_result($result,$i,'gid');
   $mypid = mysql_result($result,$i,'id');

   //outputs the RSS item groups name

   echo
   '
       <item>
           <title>'.$title.'</title>
<description>'.$description.'</description>
               <link>http://www.'.$rss_site.$url_product.'</link>
              <guid>http://www.'.$rss_site.$url_product.'</guid>
       </item>   
   ';


} //end of the for-loop

mysql_close(); //close the DB

echo //close the XML file
' </channel>
</rss>';

Hope it helps I now this is not the best way of coding a rss feed but it work for now. please update code here if you can help this on.

 

Thanks

 

Simon

Edited by thehost5968
Link to comment
Share on other sites

Sorry if the above code is not showing right here is a fixed code:

 

include("configuration.php");

// Insert here the the title of your feed
$rss_title= ".com RSS feed";  
// Insert your site, in the format site.com
$rss_site= ".com" ;
// Insert the description of your website
$rss_description= "Description of your RSS feed";
// Applicable language of the feed. For spanish, change to "es"
$rss_language="en";                     
// Address of the logo file. It can be called whatever you want it to be!
$rss_logo="http://www.".$rss_site."/images/rss.gif";  
// the feed's author email
$emailadmin="your@emailaddress.com";   

// set the file's content type and character set
// this must be called before any output
header("Content-Type: text/xml;charset=utf-8");


// Open the database

mysql_connect($db_host,$db_username,$db_password);
   @mysql_select_db($db_name) or die("Unable to select DB");

// Select all the records from the Articles/Blog table - whatever you're using it for

$query = "
Select
   tblproducts.`id`,
   tblproducts.`type`,
   tblproducts.`gid`,
   tblproducts.`name`,
   tblproducts.`description`,
   tblproducts.`hidden`,
   tblproducts.`showdomainoptions`,
   tblproducts.`welcomeemail`,
   tblproducts.`stockcontrol`,
   tblproducts.`qty`,
   tblproducts.`proratabilling`,
   tblproducts.`proratadate`,
   tblproducts.`proratachargenextmonth`,
   tblproducts.`paytype`,
   tblproducts.`subdomain`,
   tblproducts.`autosetup`,
   tblproducts.`servertype`,
   tblproducts.`defaultserver`,
   tblproducts.`configoption1`,
   tblproducts.`configoption2`,
   tblproducts.`configoption3`,
   tblproducts.`configoption4`,
   tblproducts.`configoption5`,
   tblproducts.`configoption6`,
   tblproducts.`configoption7`,
   tblproducts.`configoption8`,
   tblproducts.`configoption9`,
   tblproducts.`configoption10`,
   tblproducts.`configoption11`,
   tblproducts.`configoption12`,
   tblproducts.`configoption13`,
   tblproducts.`configoption14`,
   tblproducts.`configoption15`,
   tblproducts.`configoption16`,
   tblproducts.`configoption17`,
   tblproducts.`configoption18`,
   tblproducts.`configoption19`,
   tblproducts.`configoption20`,
   tblproducts.`configoption21`,
   tblproducts.`configoption22`,
   tblproducts.`configoption23`,
   tblproducts.`configoption24`,
   tblproducts.`freedomain`,
   tblproducts.`freedomainpaymentterms`,
   tblproducts.`freedomaintlds`,
   tblproducts.`upgradepackages`,
   tblproducts.`configoptionsupgrade`,
   tblproducts.`billingcycleupgrade`,
   tblproducts.`tax`,
   tblproducts.`affiliateonetime`,
   tblproducts.`affiliatepaytype`,
   tblproducts.`affiliatepayamount`,
   tblproducts.`downloads`,
   tblproducts.`order`,
   tblproductgroups.`id`,
   tblproductgroups.`name` As `groups name`,
   tblproductgroups.`disabledgateways`,
   tblproductgroups.`hidden`,
   tblproductgroups.`order`,
   tblpricing.`id`,
   tblpricing.`type`,
   tblpricing.`currency`,
   tblpricing.`relid`,
   tblpricing.`msetupfee`,
   tblpricing.`qsetupfee`,
   tblpricing.`ssetupfee`,
   tblpricing.`asetupfee`,
   tblpricing.`bsetupfee`,
   tblpricing.`monthly`,
   tblpricing.`quarterly`,
   tblpricing.`semiannually`,
   tblpricing.`annually`,
   tblpricing.`biennially`
From
(tblproducts tblproducts LEFT OUTER JOIN tblproductgroups tblproductgroups ON (tblproducts.gid = tblproductgroups.id)) LEFT OUTER JOIN tblpricing tblpricing ON (tblpricing.relid = tblproducts.id)
Where 
    ( tblproductgroups.hidden <> 'on' ) 
   And ( tblpricing.`currency` = 1 ) 
   And ( tblpricing.type = 'product' )
Order by
   tblproductgroups.id Asc
" ;
$result = mysql_query($query) or die("Query failed") ;

$num_rows = mysql_num_rows($result);
echo
'<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
   <channel>
     <title>'.$rss_title.'</title>
     <link>http://www.'.$rss_site.'</link>
     <description>'.$rss_description.'</description>';


for($i=0;$i<$num_rows; $i++) //will loop through 500 times to generate 500 RSS items
{

   $photo_name = 'where-ever a photo for this article could be found - needs to be http://www.yoursite.com/images/whatever.gif';     

   $title = mysql_result($result,$i,'name'); //subject line for the RSS item
   $groupsname = mysql_result($result,$i,'groups name');
   // Pass the record URL_product to the variable $url_product. It also
   // has to include the relative path, like in: "path/product1.htm"
   $productinfopid = mysql_result($result,$i,'id');
   $url_product = '/cart.php?a=add&pid='.$productinfopid.''; //define the URL of where people could read this blog/article entry
   $url_product_image = '/templates/new_portal/images/products/'.$productinfopid.'.jpg'; //define the URL of where people could read this blog/article entry

   // Define a description of the item http://westonehosting.com/cart.php?a=add&pid=85

   $description = mysql_result($result,$i,'description'); //easiest way is by grabbing the content

   // Clean the description

   $description = str_replace ("&","",htmlspecialchars(strip_tags($description)));
   $description = str_replace ("nbsp;","",htmlspecialchars(strip_tags($description)));

   //This is a teaser of your article, basically what RSS readers will show the user in their inbox.  
   //This is how you entice users to come over and read the full article

   //the easiest way is to just take the first few hundred characters of the content (description)

   $short_description = substr($description,0,50) . "...";

   $mygid = mysql_result($result,$i,'gid');
   $mypid = mysql_result($result,$i,'id');
   $mygpricemonthly = mysql_result($result,$i,'monthly');
   $mygpricequarterly = mysql_result($result,$i,'quarterly');
   $mygpricesemiannually = mysql_result($result,$i,'semiannually');
   $mygpriceannually = mysql_result($result,$i,'annually');
   $mygpricebiennially = mysql_result($result,$i,'biennially');
   //outputs the RSS item groups name

   echo
   '
       <item>
           <title>'.$title.'</title>
               <g:id>'.$mygid.'.'.$mypid.'</g:id>
               <g:condition>new</g:condition>
           <description>'.$description.'</description>
               <g:expiration_date>2006-12-20</g:expiration_date>
               <g:image_link>http://www.'.$rss_site.$url_product_image.'</g:image_link>
           <link>http://www.'.$rss_site.$url_product.'</link>
               <g:price>'.$mygpricemonthly.'</g:price>
               <g:price>'.$mygpricequarterly.'</g:price>
               <g:price>'.$mygpricesemiannually.'</g:price>
               <g:price>'.$mygpriceannually.'</g:price>
               <g:price>'.$mygpricebiennially.'</g:price>
               <g:product_type>'.$groupsname.'</g:product_type>
               <g:payment_notes>Google Checkout</g:payment_notes>
               <guid>http://www.'.$rss_site.$url_product.'</guid>
       </item>    
   ';


} //end of the for-loop

mysql_close(); //close the DB

echo //close the XML file
' </channel>
</rss>';

Edited by thehost5968
Link to comment
Share on other sites

The 2nd one I posted was my google test script but it did not work sorry try this one:

 

Product RSS V1.5 (THIS IS FULL PHP SO WILL ONLY WORK WITH Page Manager Module AND BEING PUT IN THE Smartyvalues: box only

 

include("configuration.php");

 

// Insert here the the title of your feed

$rss_title= ".com RSS feed";

// Insert your site, in the format site.com

$rss_site= ".com" ;

// Insert the description of your website

$rss_description= "Description of your RSS feed";

// Applicable language of the feed. For spanish, change to "es"

$rss_language="en";

// Address of the logo file. It can be called whatever you want it to be!

$rss_logo="http://www.".$rss_site."/images/rss.gif";

// the feed's author email

$emailadmin="your@emailaddress.com";

 

// set the file's content type and character set

// this must be called before any output

header("Content-Type: text/xml;charset=utf-8");

 

 

// Open the database

 

mysql_connect($db_host,$db_username,$db_password);

@mysql_select_db($db_name) or die("Unable to select DB");

 

// Select all the records from the Articles/Blog table - whatever you're using it for

 

$query = "

Select

tblproducts.`id`,

tblproducts.`type`,

tblproducts.`gid`,

tblproducts.`name`,

tblproducts.`description`,

tblproducts.`hidden`,

tblproducts.`showdomainoptions`,

tblproducts.`welcomeemail`,

tblproducts.`stockcontrol`,

tblproducts.`qty`,

tblproducts.`proratabilling`,

tblproducts.`proratadate`,

tblproducts.`proratachargenextmonth`,

tblproducts.`paytype`,

tblproducts.`subdomain`,

tblproducts.`autosetup`,

tblproducts.`servertype`,

tblproducts.`defaultserver`,

tblproducts.`configoption1`,

tblproducts.`configoption2`,

tblproducts.`configoption3`,

tblproducts.`configoption4`,

tblproducts.`configoption5`,

tblproducts.`configoption6`,

tblproducts.`configoption7`,

tblproducts.`configoption8`,

tblproducts.`configoption9`,

tblproducts.`configoption10`,

tblproducts.`configoption11`,

tblproducts.`configoption12`,

tblproducts.`configoption13`,

tblproducts.`configoption14`,

tblproducts.`configoption15`,

tblproducts.`configoption16`,

tblproducts.`configoption17`,

tblproducts.`configoption18`,

tblproducts.`configoption19`,

tblproducts.`configoption20`,

tblproducts.`configoption21`,

tblproducts.`configoption22`,

tblproducts.`configoption23`,

tblproducts.`configoption24`,

tblproducts.`freedomain`,

tblproducts.`freedomainpaymentterms`,

tblproducts.`freedomaintlds`,

tblproducts.`upgradepackages`,

tblproducts.`configoptionsupgrade`,

tblproducts.`billingcycleupgrade`,

tblproducts.`tax`,

tblproducts.`affiliateonetime`,

tblproducts.`affiliatepaytype`,

tblproducts.`affiliatepayamount`,

tblproducts.`downloads`,

tblproducts.`order`,

tblproductgroups.`id`,

tblproductgroups.`name` As `groups name`,

tblproductgroups.`disabledgateways`,

tblproductgroups.`hidden`,

tblproductgroups.`order`,

tblpricing.`id`,

tblpricing.`type`,

tblpricing.`currency`,

tblpricing.`relid`,

tblpricing.`msetupfee`,

tblpricing.`qsetupfee`,

tblpricing.`ssetupfee`,

tblpricing.`asetupfee`,

tblpricing.`bsetupfee`,

tblpricing.`monthly`,

tblpricing.`quarterly`,

tblpricing.`semiannually`,

tblpricing.`annually`,

tblpricing.`biennially`

From

(tblproducts tblproducts LEFT OUTER JOIN tblproductgroups tblproductgroups ON (tblproducts.gid = tblproductgroups.id)) LEFT OUTER JOIN tblpricing tblpricing ON (tblpricing.relid = tblproducts.id)

Where

( tblproductgroups.hidden <> 'on' )

And ( tblpricing.`currency` = 1 )

And ( tblpricing.type = 'product' )

Order by

tblproductgroups.id Asc

" ;

$result = mysql_query($query) or die("Query failed") ;

 

$num_rows = mysql_num_rows($result);

echo

'<?xml version="1.0" encoding="utf-8" ?>

<channel>

<title>'.$rss_title.'</title>

<link>http://www.'.$rss_site.'</link>

<description>'.$rss_description.'</description>';

 

 

for($i=0;$i<$num_rows; $i++) //will loop through 500 times to generate 500 RSS items

{

 

$photo_name = 'where-ever a photo for this article could be found - needs to be http://www.yoursite.com/images/whatever.gif';

 

$title = mysql_result($result,$i,'name'); //subject line for the RSS item

$groupsname = mysql_result($result,$i,'groups name');

// Pass the record URL_product to the variable $url_product. It also

// has to include the relative path, like in: "path/product1.htm"

$productinfopid = mysql_result($result,$i,'id');

$url_product = '/cart.php?a=add&pid='.$productinfopid.''; //define the URL of where people could read this blog/article entry

$url_product_image = '/templates/new_portal/images/products/'.$productinfopid.'.jpg'; //define the URL of where people could read this blog/article entry

 

// Define a description of the item http://westonehosting.com/cart.php?a=add&pid=85

 

$description = mysql_result($result,$i,'description'); //easiest way is by grabbing the content

 

// Clean the description

 

$description = str_replace ("&","",htmlspecialchars(strip_tags($description)));

$description = str_replace ("nbsp;","",htmlspecialchars(strip_tags($description)));

 

//This is a teaser of your article, basically what RSS readers will show the user in their inbox.

//This is how you entice users to come over and read the full article

 

//the easiest way is to just take the first few hundred characters of the content (description)

 

$short_description = substr($description,0,50) . "...";

 

$mygid = mysql_result($result,$i,'gid');

$mypid = mysql_result($result,$i,'id');

//outputs the RSS item groups name

 

echo

'

<item>

<title>'.$title.'</title>

<description>'.$description.'</description>

<link>http://www.'.$rss_site.$url_product.'</link>

<guid>http://www.'.$rss_site.$url_product.'</guid>

</item>

';

 

 

} //end of the for-loop

 

mysql_close(); //close the DB

 

echo //close the XML file

' </channel>

</rss>';

Live Demo: http://westonehosting.com/productrss.html

 

attach file is the php code

productrss.txt

Edited by thehost5968
Link to comment
Share on other sites

In the example in the readme is the following code:

------------------------------------------
Loggedin Code

$smartyvalues['message'] = '<b>Welcome '.$clientsdetails['firstname'].' !</b>';
------------------------------------------
Smartyvalues

$smartyvalues['newpic'] = '<img src="images/ccv.gif">';
------------------------------------------
Body

<p>If customer is logged in, a message will follow here: {$message}</p>
<hr>
<h3>Today is {$todaysdate}</h3>
This date is pulled from globally available variables.
<hr>
<br><br>
<div align="center">
Here is an image<br>{$newpic}
</div>

 

We have tested this with a logged in customer and its not displaying the customers firstname

Link to comment
Share on other sites

is this the only thing you are putting in the logedin box:

 

$smartyvalues['message'] = '<b>Welcome '.$clientsdetails['firstname'].' !</b>';

 

and only this in the Smartyvalues box:

 

$smartyvalues['newpic'] = '<img src="images/ccv.gif">';

 

and only this in the Body box:

 

<p>If customer is logged in, a message will follow here: {$message}</p>

<hr>

<h3>Today is {$todaysdate}</h3>

This date is pulled from globally available variables.

<hr>

<br><br>

<div align="center">

Here is an image<br>{$newpic}

</div>

 

If so then it should be working else you could try puting {debug} in a std .tlp file then go to the page url and a popup box will list all that can be used and see if clientsdetails firstname is showing Wright or not.

Link to comment
Share on other sites

  • 1 month later...

I am trying to use the page manager to show a 404 error page on pages not in the database. I created a page in Page Manager with URL Name of 404. My hope is to make any page that does in exist with that urlname in the database will show the 404 page, ie When http://www.domain.com/page34.html or http://www.domain.com/index.php?page=page34 are visited, but there is no page with the URL Name of page34, the page will display the contents of URL Name 404 instead.

 

I was told by someone at phpbuilder.com to change the following in the index.php file:

 

Change this:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'"';

To this:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'" OR urlname = "404" LIMIT 1';

This will show the 404 on all pages except for the first database entry.

 

 

If I change it to:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'" OR urlname = "404"';

It will show the 404 on all pages except for the last database entry.

 

 

Surely there is a way to do this, but I cannot seem to figure it out.

 

Any help would be greatly appreciated.

Eddie

Link to comment
Share on other sites

I am trying to use the page manager to show a 404 error page on pages not in the database. I created a page in Page Manager with URL Name of 404. My hope is to make any page that does in exist with that urlname in the database will show the 404 page, ie When http://www.domain.com/page34.html or http://www.domain.com/index.php?page=page34 are visited, but there is no page with the URL Name of page34, the page will display the contents of URL Name 404 instead.

 

I was told by someone at phpbuilder.com to change the following in the index.php file:

 

Change this:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'"';

To this:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'" OR urlname = "404" LIMIT 1';

This will show the 404 on all pages except for the first database entry.

 

 

If I change it to:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'" OR urlname = "404"';

It will show the 404 on all pages except for the last database entry.

 

 

Surely there is a way to do this, but I cannot seem to figure it out.

 

Any help would be greatly appreciated.

Eddie

 

 

Edit your .htacess and add

 

ErrorDocument 404 /errorpage.html

 

And then just add a new page in page managed called errorpage

 

 

I think thats what you mean

Link to comment
Share on other sites

That does work for pages not found. In fact, I already had that in my .htaccess file. It is working for pages not ending in .html.

 

However, it won't work for this as the page does exist according to apache. It just doesn't exist as an entry in the database, so it just shows a blank page.

 

I am pretty sure the index.php of the Page Manager needs additional code for this to work.

 

Thanks for the replies,

Eddie

Link to comment
Share on other sites

That does work for pages not found. In fact, I already had that in my .htaccess file. It is working for pages not ending in .html.

 

However, it won't work for this as the page does exist according to apache. It just doesn't exist as an entry in the database, so it just shows a blank page.

 

I am pretty sure the index.php of the Page Manager needs additional code for this to work.

 

Thanks for the replies,

Eddie

Not sure what your on about to be perfectly honest, its working fine for me,

 

Have you made the page in page manager? if so please post the link to the page not found and what your adding into the .htaccess

 

or email me it or add me on msn and i'd be happy to help

Link to comment
Share on other sites

First, I changed the index.php file to page_manager.php as I am not using this for the homepage. I wouldn't think that would make a difference.

 

Here is what is in my .htaccess file:

# Customized error messages.
ErrorDocument 404 /404.html

#Page Manager
RewriteRule ^([^/\.]+).html?$ page_manager.php?page=$1 [L]

 

Here are some examples:

 

http://www.deluxetech.com/servers.php >> page does not exist.

http://www.deluxetech.com/servers.html >> There is a page in Page Manager for servers.

http://www.deluxetech.com/hosting.html >> There is no page in Page Manager for hosting.

 

The first page does show the error page as the file does not exist so it is redirected to 404.html which is a page in Page Manager.

The second file also exists in Page Manager so it shows what is in the database.

The third file is redirected according to the rules in the .htaccess file, but it does not exist in the Page Manager database. In the case, a blank page is displayed.

Link to comment
Share on other sites

First, I changed the index.php file to page_manager.php as I am not using this for the homepage. I wouldn't think that would make a difference.

 

Here is what is in my .htaccess file:

# Customized error messages.
ErrorDocument 404 /404.html

#Page Manager
RewriteRule ^([^/\.]+).html?$ page_manager.php?page=$1 [L]

Here are some examples:

 

http://www.deluxetech.com/servers.php >> page does not exist.

http://www.deluxetech.com/servers.html >> There is a page in Page Manager for servers.

http://www.deluxetech.com/hosting.html >> There is no page in Page Manager for hosting.

 

The first page does show the error page as the file does not exist so it is redirected to 404.html which is a page in Page Manager.

The second file also exists in Page Manager so it shows what is in the database.

The third file is redirected according to the rules in the .htaccess file, but it does not exist in the Page Manager database. In the case, a blank page is displayed.

 

Just noticed same thing on my website, Didnt understand what you ment at 1st now i do, no idea why its causing this, will look at the code later tonight if i have time but i'm not a advanced coder so wont be much help probably, maybe the mod maker could shed some light? or a advanced coder?

Link to comment
Share on other sites

no not remove the ReWrite rule from the htaccess file but just try using the url like this:

 

yourdomain.com/page_manager.php?page=$1
$1 replace with the page name from within the admin?

 

as when I use this on my site it does go to the 404 page (but on my site I have 404's going to my home page):

 

westonehosting.com/page_manager.php?page=hilltest

 

so it is not page manager but to do with the ReWrite rule in the htaccess file?

Edited by thehost5968
Link to comment
Share on other sites

but the ReWrite rule will always do this just try it on the Knowledge base.

 

then try it on the Knowledge base with a tru direct url and that also will not go to a 404 page.

 

ie this works: http://westonehosting.com/knowledgebase.php?action=displaycat&catid=1

 

but this dose not but it will not go to a 404 page: http://westonehosting.com/knowledgebase.php?action=displaycat&catid=22

Edited by thehost5968
Link to comment
Share on other sites

When I go to http://westonehosting.com/knowledgebase.php?action=displaycat&catid=22'>http://westonehosting.com/knowledgebase.php?action=displaycat&catid=22 it redirects me to http://westonehosting.com/knowledgebase.php

 

I believe the code in WHMCS for the knowledgebase is doing that.

 

I am trying to find the code to put in the index.php file of Page Manager that will redirect pages not in the database to my 404 page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated