Jump to content

Wanted Beta Testers - Page Manager Module


Recommended Posts

Problem solved!

 

Shrike at phpbuilder.com gave me the answer. To use the Page Manager for your 404 error page do the following:

 

Enter this into your page manager index file (assuming index.php):

Find:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'"';
$result = mysql_query ($query);

Replace with:

$query = 'SELECT * FROM tblpages WHERE urlname = "'.$id.'"'; $result = mysql_query ($query); if( mysql_num_rows( $result ) == 0 ) {
 $query = 'SELECT * FROM tblpages WHERE urlname = "404"';
 $result = mysql_query ($query);
}

 

Add this to your .htaccess file:

# Customized error messages.
ErrorDocument 404 /404.html

 

Both of these assume that you have created a page in Page Manager with the URL Name of 404. If not, change 404 in the above code to the correct urlname.

Link to comment
Share on other sites

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

Top Posters In This Topic

We have put in the information just like in the example

 

and we get no name listed,

it works on all the default pages but not on the page manager pages

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

 

 

 

and only this in the Smartyvalues box:

 

 

 

and only this in the Body box:

 

 

 

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

When I add the following it shows the first time, when I go to edit the page it shows it messed up then deletes all but the first table.

 

I am entering it in the body area so that should not be the problem,

 

<table width="250" border="1">
 <tr>
   <td><div align="center"><img src=""><br />
       <br />
         <textarea name="mediumgreen" cols="20px" rows=""></textarea>
   </div></td>
   <td><div align="center"><img src=""><br />
       <br />
         <textarea name="mediumgreen" cols="20px" rows=""></textarea>
   </div></td>
   <td><div align="center"><img src=""><br />
       <br />
         <textarea name="mediumgreen" cols="20px" rows=""></textarea>
   </div></td>
   <td><div align="center"><img src=""><br />
       <br />
         <textarea name="mediumgreen" cols="20px" rows=""></textarea>
   </div></td>
   <td><div align="center"><img src=""><br />
       <br />
         <textarea name="mediumgreen" cols="20px" rows=""></textarea>
   </div></td>
 </tr>
 <tr>
   <td> </td>
   <td> </td>
   <td> </td>
   <td> </td>
   <td> </td>
 </tr>
 <tr>
   <td> </td>
   <td> </td>
   <td> </td>
   <td> </td>
   <td> </td>
 </tr>
</table>

 

Any ideas on why it is doing this and how I can fix it?

 

Thank you.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry to bring up a old topic,,

 

But does anyone know how i can get it to display the latest announcement ?

 

<?php

include("support/dbconnect.php");

include("support/includes/functions.php");

$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3";

$result = mysql_query($query);

while ($data = mysql_fetch_array($result)) {

$id = $data["id"];

$date = $data["date"];

$title = $data["title"];

$announcement = $data["announcement"];

$date = fromMySQLDate($date);

echo("<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>");

}

?>

This is the php code, how do i insert it into page manager?

 

as currently when i just insert that it gives me

$date - $title

$announcement

"); } ?>

Can anyone help ?
Link to comment
Share on other sites

Sorry to bring up a old topic,,

 

But does anyone know how i can get it to display the latest announcement ?

 

This is the php code, how do i insert it into page manager?

 

as currently when i just insert that it gives me

Can anyone help ?

 

Try this:

<?php
include("support/dbconnect.php");
include("support/includes/functions.php");
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; 
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
 echo '<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>;
}
?>

echo '<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>;

 

And put it in the "Smartyvalues" box and not the "Body" box

Edited by thehost5968
Link to comment
Share on other sites

Try this:

<?php
include("support/dbconnect.php");
include("support/includes/functions.php");
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; 
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
 echo '<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>;
}
?>

echo '<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>;

 

And put it in the "Smartyvalues" box and not the "Body" box

 

Ok, So the

<?php
include("support/dbconnect.php");
include("support/includes/functions.php");
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY  date DESC LIMIT 0,3"; 
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
 echo '<p><font color=#cccccc>$date</font> -  <b>$title</b><br>$announcement</p>;
}
?>

 

Goes in"Smartyvalues" box or "body box?

 

and this line you've put

echo '<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>;

 

Goes in"Smartyvalues" box or "body box?

 

Sorry, dont really understand fully how this thing works,, Cheers for your help

Link to comment
Share on other sites

OK

 

 <?php
include("support/dbconnect.php");
include("support/includes/functions.php");
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; 
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
 echo("<p><font color=#cccccc>". $date ."</font> - <b>". $title ."</b> <br>". $announcement ."</p>");
}
?>  

Now as the above code is all / Full PHP you can only get this working if it go in the "Smartyvalues" box,

 

Now then biff box's:

 

Loggedin Code box = any PHP and building of smarty tags FOR USE TO SHOW INFO TO ONLY LOGGED IN CLIENTS,

 

Smartyvalues box = any PHP and building of smarty tags FOR DISPLY TO ALL,

 

Body Box = any HTML or TEXT AND SMARTY TAGS BUT NO PHP CODE,

 

Also:

 

Loggedin Code box and Smartyvalues box are = to what would go in to a .PHP part of WHMCS custom page.

Body Box are = to what would go in to the .tpl part of WHMCS custom page.

 

Hope this helps

Edited by thehost5968
Link to comment
Share on other sites

OK

 

 <?php
include("support/dbconnect.php");
include("support/includes/functions.php");
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; 
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
 echo("<p><font color=#cccccc>". $date ."</font> - <b>". $title ."</b> <br>". $announcement ."</p>");
}
?>  

Now as the above code is all PHP you can only get this working if it go in the "Smartyvalues" box,

 

Now then biff box's:

 

Loggedin Code box = any PHP and building of smarty tags FOR USE TO SHOW INFO TO ONLY LOGGED IN CLIENTS,

 

Smartyvalues box = any PHP and building of smarty tags FOR DISPLY TO ALL,

 

Body Box = any HTML or TEXT AND SMARTY TAGS BUT NO PHP CODE,

 

Hope this helps

Ok cheers you've been a big help with exsplaining,

 

I've added all the code to the smartyvalues and the page displays nothing, I presume i need to add a bit to the body box aswell ?

Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...

For those use who have modified their default TinyMCE Editor to allow server side spellcheck and/or have modified the editor buttons, here is a way to bring those changes to the page editor...

 

Replace the top 24 (or so) lines that include the two tinymce script code blocks:

<script language="javascript" type="text/javascript" src="editor/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
editor_selector : "mceEditor",
mode : "textareas",
theme : "advanced",
convert_urls : false,
relative_urls : false,
   plugins : "style,table,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,visualchars,xhtmlxtras",
   theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
function toggleEditor(id) {
   if (!tinyMCE.get(id))
       tinyMCE.execCommand('mceAddControl', false, id);
   else
       tinyMCE.execCommand('mceRemoveControl', false, id);
}
</script>

 

and replace it with this one line of code:

<?php include("editor/editor.php"); ?>

Link to comment
Share on other sites

  • 2 months later...
Well I posted last in April its now July This module would kick serious %$#$%% if it actually would work correctly

 

If the authors are still around a quick reply here would rock

I shall be releasing a new version of a module similar over next few days!

Includes multi language, different access levels, published status ect! A new forum post will be made soon!

Link to comment
Share on other sites

I shall be releasing a new version of a module similar over next few days!

Includes multi language, different access levels, published status ect! A new forum post will be made soon!

 

I've got the code setup to only allow paid customers of specific products, access to custom pages... Does your product do this already?

 

If you'd like the code PM me and I'll send it to you.

 

I've been adding the pages manually but your addon would speed up the process and make is much easier to add password protected pages for paid customers

Link to comment
Share on other sites

I've got the code setup to only allow paid customers of specific products, access to custom pages... Does your product do this already?

 

If you'd like the code PM me and I'll send it to you.

 

I've been adding the pages manually but your addon would speed up the process and make is much easier to add password protected pages for paid customers

Currently the system allows you to select access levels for vistors, registered users and administrators for pages,

If you email me or pm me the code i can take a look at adding this feature, however you should still be able to do this without it being added to the module as a core feature just insert the code inside the admin area

 

Cheers

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