MyBB Community Forums

Full Version: [Page Manager] Share your custom pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Options > Enable Page Wink
Okay thanks for the help everything works. Still have one problem because I have a good php code on a regular page that displays them on the entire page in the cast him into the code and page php.xml manger displays it strangely http://plgf-ls.pl/misc.php?page=pytania see for yourself. php page = http://plgf.xaa.pl/rejestracja2.php questions and here is the very same code, and displays them on the entire page, why? Even give the code from the Page Manger php.xml

<?php

global $headerinclude, $header, $theme, $footer;

$template='<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="'.$theme['borderwidth'].'" cellpadding="'.$theme['tablespace'].'" class="tborder">
<thead>
<tr>
<td class="thead">
<strong>'.$pages['name'].'</strong>
</td>
</tr>
</thead>
<tbody>
<tr>
<td class="trow1"><iframe src="/rejestracja2.php"&nbsp;width="1100" height="1100" frameborder="0" scrolling="no"></iframe></td>
</tr>
</tbody>
</table>
<br />
{$footer}
</body>
</html>';

$template=str_replace("\'", "'", addslashes($template));

add_breadcrumb($pages['name']);

eval("\$page=\"".$template."\";");

output_page($page);

?>
Google Usermap the loading and setup, after all the great work
However, the map does not show the members, who later claimed in the residence.
I tried to re-activate and deactivate the Google Usermap page, but not solved this problem.
What should be done to ensure that users are always placed him on the map?

(2010-01-24, 07:52 PM)querschlaeger Wrote: [ -> ]Okay, here is a useful page: Usermap (powered by Google Maps)!
It will display all of your users who provide there location in the default MyBB custom profile field in a nice Google Map!

You need a Google Maps API key for your website, get it here: http://code.google.com/apis/maps/signup.html

Edit the custom page and you will see the point to type in the key (line 3).

First run of the page will take some time to create the location cache. Don't worry about it and don't abort the page loading.

By the way: I developed a plugin called Page Converter, you will find it here: http://mods.mybboard.net/view/page-converter
This plugin allows you to convert custom pages of various page plugins into Page Manager pages. Cool
(2010-03-27, 12:44 PM)atomjani Wrote: [ -> ]What should be done to ensure that users are always placed him on the map?

The page updates itself every 48 hour. If you want it in a shorter time modify the cache time (seconds):
time()-filemtime($datacache) > 169200

btw all pages in this thread are code examples. Without PHP knowledge it's pointless to use Page Manager.
How to block page for more than one GID?

--- update ---

Got it!

if(!in_array($mybb->user['usergroup'], array('gid1','gid2',...)))
{
error_no_permission();
}

gid1, gid2 are allowed gids Smile
Parse error: syntax error, unexpected T_STRING in /home/..../public_html/inc/plugins/pagemanager.php(803) : eval()'d code on line 29

What's that mean?
I used a file http://community.mybboard.net/attachment.php?aid=17042 (parser.php) and added the text with bbcode.
It seems there is an PHP syntax error near line 29.

Can you post the complete page code here?
(2010-04-18, 01:23 PM)querschlaeger Wrote: [ -> ]It seems there is an PHP syntax error near line 29.

Can you post the complete page code here?

I found it. I used the character ' in my text and that is why this problem occurred. Thanks for advice, querschlaeger Smile
Everybody please remember that this thread is titled "Share your custom pages", not "general php support".
I like add background color. Can you help me?
The "Use MyBB Template" is on. The content is next:
Quote:<center><h2>Közös céljaink</h2></center>
<h3>Fő célunk az, hogy egy igazán jó közösséggé formálódjunk a következő szempontok alapján: <br>
1. Fontosnak tarjuk, hogy minél tartalmasabb legyen ez az oldal. Együtt törekszünk erre. <br>
A tartalmak legfontosabb értéke abban rejlik, hogy egy adott tartalom mennyire hasznos, érdekes vagy szórakoztató. Valamennyien fontosnak tarjuk ezt.<br>
2. Szeretnénk egy minél jobb társaságot kialakítani. Szeretnénk, hogy minél többen beszélgessenek, ismerkedjenek, barátkozzanak szívesen. Ezenkívül társkeresők számára is minél több pozitív élményt szeretnénk adni. Itt az oldalunkon a kapcsolatok teremtése és kialakítása is nagyon fontos.<br>
3. A szórakozás a harmadik dolog, amit szeretnénk nyújtani, hiszen úgy gondoljuk, hogy mindenkinek jár egy jó kikapcsolódás.

Ezt a 3 szempontot figyelembe véve törekszünk arra, hogy minél jobb és ezáltal népszerűbb közösség legyen. Mi együtt tesszük ezt, így garantáljuk azt, hogy a lehető legjobb közösséggé váljunk.
</h3>
<center><h2>Játékszabályok</h2></center>
<h3>Mivel közösségben élünk, ezért néhány szabályt be kell tartani, hogy ne legyen anarchia és biztosítja a jó közösséget.<br>
Ne tegyünk és ne mondjunk olyan dolgokat, amivel mást megbánthatjuk. Tiszteljük a másikat. Helyette inkább mondjuk el az érzéseinket és keressünk olyan megoldást, ami mindkét félnek jó.<br>
Fogadjuk el a másikat annyira, amennyire ez lehetséges. Nem kell egyetérteni mindenben vele, de ne akarjuk a saját gondolkodásainkat ráerőltetni, hogyha ő ezt nem akarja.<br>
Ha minket sértegetnek valamilyen módon, arra kétféleképpen reagáljuk. Vagy elmondjuk a másiknak, hogy milyen érzést váltott ki belőlünk. Ezt akaratlanul is megtehette. Vagy jelentjük a moderátorok, admin felé. Kerüljük azt, hogy ezt másnak is elmondjuk, ugyanis ez sokkal inkább személyes, mint közösségre tartozó dolog.<br>
Próbáljuk a saját érdekeinket úgy előtérbe helyezni, hogy az a közösség számára is minél építőbb legyen. Ha újabb igényünk támadna, akkor ne féljünk megosztani azt a közösségben, hiszen lehet, hogy ilyen igénye másnak is van.<br>
Végül törekedjünk arra, hogy minél jobb közösség legyen, hiszen ezzel csak mindenki nyerhet.
</h3>