Hello,
its possible to make /mypage.php visible to guests if my all forum is invisible for guests? i have application form and i dont want that peoples should register to my forum for fill out application. if its possible, so what i must to do?
(2013-02-12, 08:16 PM)Gangsteris Wrote: [ -> ]Hello,
its possible to make /mypage.php visible to guests if my all forum is invisible for guests? i have application form and i dont want that peoples should register to my forum for fill out application. if its possible, so what i must to do?
without the content of /mypage.php it is impossible to answer .. what have you coded in that file ?
(2013-02-12, 09:16 PM)JimR Wrote: [ -> ] (2013-02-12, 08:16 PM)Gangsteris Wrote: [ -> ]Hello,
its possible to make /mypage.php visible to guests if my all forum is invisible for guests? i have application form and i dont want that peoples should register to my forum for fill out application. if its possible, so what i must to do?
without the content of /mypage.php it is impossible to answer .. what have you coded in that file ?
mypage.php content is here:
<?php
define('IN_MYBB', 1); require "./global.php";
add_breadcrumb("Title here", "mypage.php");
eval("\$html = \"".$templates->get("mypage")."\";");
output_page($html);
?>
So maybe someone know how to do it? i need help.
(2013-02-12, 09:27 PM)Gangsteris Wrote: [ -> ] (2013-02-12, 09:16 PM)JimR Wrote: [ -> ] (2013-02-12, 08:16 PM)Gangsteris Wrote: [ -> ]Hello,
its possible to make /mypage.php visible to guests if my all forum is invisible for guests? i have application form and i dont want that peoples should register to my forum for fill out application. if its possible, so what i must to do?
without the content of /mypage.php it is impossible to answer .. what have you coded in that file ?
mypage.php content is here:
<?php
define('IN_MYBB', 1); require "./global.php";
add_breadcrumb("Title here", "mypage.php");
eval("\$html = \"".$templates->get("mypage")."\";");
output_page($html);
?>
So maybe someone know how to do it? i need help.
you have a long way to go .... you need to add something to your file
so a the start of the file could be
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'mypage.php'); // add the script name
require_once "./global.php"; // db connections etc from the host
require_once MYBB_ROOT."inc/functions_post.php"; // add functions
require_once MYBB_ROOT."inc/functions_forumlist.php"; // ditto
require_once MYBB_ROOT."inc/class_parser.php"; // ditto
require_once MYBB_ROOT."inc/db_pdo.php";
$parser = new postParser; // add the page display code
$templatelist = "groupstatement,groupstatement_row"; // add templates we can use
global $headerinclude, $header, $theme, $footer, $templates, $lang, $mybb, $db;// standard templates & themes
then you could add this as an error handler
$fid = $_GET['fid']; // area to act on from the url
if ($fid==0)
{
// invalid area code
build_forum_breadcrumb($fid); // make navigation
add_breadcrumb("Error", "mypage.php");
$template = '<html>
<head>
<title>Error</title>'.$headerinclude.'
</head><body>'.$header.'<navigation>';
$template.='<table border="0"><tr><td class="trow1"><b><br><center><a class="button" href="forumdisplay.php?fid='.$fid.'">Go Back</td></tr></table><br>'.$footer;
eval("\$page = \"".$template."\";");
output_page($template);
die();
}
this just gives a go back link on error and outputs the result. After that you will need to add the code to do what you want e.g a database query
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."forums f WHERE f.type='f' AND FIND_IN_SET($fid, f.parentlist) ORDER BY f.name"); // get each forum below the current 1
then add rows
while($forum=$db->fetch_array($query))
{
$titled=$forum['name'];
eval("\$grow .= \"".$templates->get("groupstatement_row")."\";"); //put $titled into the template groupstatement_row as {$titled}
}
// then eval the main template
eval("\$groupstatement = \"".$templates->get("groupstatement")."\";");
// then output the template to the browser
output_page($groupstatement);
This is not your solution just an idea on how to code a page
can you post link of your forum?
i want to see how it is "invisible".
(2013-02-13, 09:23 PM)Gangsteris Wrote: [ -> ]Is there a easier way?
if you want the page let me know
exactly what it needs to do and I'll create the code for you
(2013-02-13, 09:56 PM)JimR Wrote: [ -> ] (2013-02-13, 09:23 PM)Gangsteris Wrote: [ -> ]Is there a easier way?
if you want the page let me know exactly what it needs to do and I'll create the code for you
i have an application form, i created it on AdminCp->Templates & Styles->Global Templates->warapp(i dont think that you need this big code) and created custom page warapp.php, all works fine if you are logged in. i want make new button on forum(i can make it self) and put this custom page url(its no problem make it and i can make), but problem is that you need register to forum to see this link. i want that you can fill application form from my custom page warapp.php without registration.
i just asking or its possible or not? or i need put my application form code to somewhere(not on my forum)?
(2013-02-13, 10:31 PM)Gangsteris Wrote: [ -> ] (2013-02-13, 09:52 PM)Alone warrior Wrote: [ -> ]can you post link of your forum?
i want to see how it is "invisible".
www.lsc-clan.net
(2013-02-13, 09:56 PM)JimR Wrote: [ -> ] (2013-02-13, 09:23 PM)Gangsteris Wrote: [ -> ]Is there a easier way?
if you want the page let me know exactly what it needs to do and I'll create the code for you
i have an application form, i created it on AdminCp->Templates & Styles->Global Templates->warapp(i dont think that you need this big code) and created custom page warapp.php, all works fine if you are logged in. i want make new button on forum(i can make it self) and put this custom page url(its no problem make it and i can make), but problem is that you need register to forum to see this link. i want that you can fill application form from my custom page warapp.php without registration.
i just asking or its possible or not? or i need put my application form code to somewhere(not on my forum)?
ok with you now .... add the template conditionals plugin and use an <if> statement around your href in whichever template your file is called from
example
<if $GLOBALS['mybb']->user['usergroup'] == 2 then>
<a href="mypage.php">do link</a> // however you could add whatever code not just a href
</if>
this will display to users with a usergroup id = 2 (refine to what you want)
just looked at your site .. to have a guest land there and receive an error (not logged in) would make them not enter the site ..... the only eye candy you have is an error, unless this site holds content that is not quite right ?
Where i should add this php code? I added on my custom template, but then page did not work...
This site not hold illegal content or something more what you think, its a game community forum. I done this invisible from other eyes. Btw question was not about content.
So you suggest me to make forum visible?