Version 1.3.0
This commit is contained in:
1 parent
7ef3d1712a
commit
f87d29ba65
290 files changed
+50206
-17930
No files matched your search
@@ -2,15 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Board v1.1
|
||||
| Invision Power Board v1.3 Final
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001,2002 Invision Power Services
|
||||
| http://www.ibforums.com
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.ibforums.com
|
||||
| Email: phpboards@ibforums.com
|
||||
| Licence Info: phpib-licence@ibforums.com
|
||||
| Web: http://www.invisionboard.com
|
||||
| Time: Sun, 04 Jan 2004 00:30:16 GMT
|
||||
| Release: 28e7bfb25f08ac72a789cb1b172fa185
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Custom profile field functions
|
||||
@@ -21,7 +23,11 @@
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
$idx = new ad_fields();
|
||||
@@ -32,7 +38,20 @@ class ad_fields {
|
||||
var $base_url;
|
||||
|
||||
function ad_fields() {
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
//---------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//---------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//---------------------------------------
|
||||
|
||||
switch($IN['code'])
|
||||
{
|
||||
@@ -77,7 +96,7 @@ class ad_fields {
|
||||
|
||||
function delete_form()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($IN['id'] == "")
|
||||
{
|
||||
@@ -129,7 +148,7 @@ class ad_fields {
|
||||
|
||||
function do_delete()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($IN['id'] == "")
|
||||
{
|
||||
@@ -163,7 +182,7 @@ class ad_fields {
|
||||
|
||||
function main_save($type='edit')
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
|
||||
|
||||
if ($IN['ftitle'] == "")
|
||||
{
|
||||
@@ -233,7 +252,7 @@ class ad_fields {
|
||||
|
||||
function main_form($type='edit')
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($type == 'edit')
|
||||
{
|
||||
@@ -323,19 +342,19 @@ class ad_fields {
|
||||
$SKIN->form_textarea("fcontent", $fields['fcontent'] )
|
||||
) );
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Show on registration page also?</b>" ,
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Include on registration page?</b>" ,
|
||||
$SKIN->form_yes_no("fshowreg", $fields["fshowreg"] )
|
||||
) );
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Field cannot be left blank?</b><br>(Will not apply if you choose to hide below)" ,
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Field MUST be completed and not left empty?</b><br>(Will not apply if you choose to hide below)" ,
|
||||
$SKIN->form_yes_no("freq", $fields['freq'] )
|
||||
) );
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Hidden to profile viewers?</b><br>If yes, only admins and super mods can see it, user can still edit." ,
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Hide from the member's profile?</b><br>If yes, only admins and super mods can see it, user can still edit." ,
|
||||
$SKIN->form_yes_no("fhide", $fields['fhide'] )
|
||||
) );
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Editable by user?</b><br>If no, user cannot edit information, field can only be seen by admins and super mods. Admins can edit information via ACP" ,
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Field can be edited by the member?</b><br>If no, user cannot edit information, field can only be seen by admins and super mods. Admins can edit information via ACP" ,
|
||||
$SKIN->form_yes_no("fedit", $fields['fedit'] )
|
||||
) );
|
||||
|
||||
@@ -356,14 +375,20 @@ class ad_fields {
|
||||
|
||||
function main_screen()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
$ADMIN->page_title = "Custom Profile Fields";
|
||||
|
||||
$ADMIN->page_detail = "Custom Profile fields can be used to add optional or required fields to be completed when registering or editing a profile. This is useful if you wish to record data from your members that is not already present in the base board.";
|
||||
|
||||
$SKIN->td_header[] = array( "Field Title" , "30%" );
|
||||
$SKIN->td_header[] = array( "Type" , "20%" );
|
||||
$ADMIN->page_detail .= "<br /><br /><strong>Using Custom Profile Fields in Topic View</strong><br /><br />
|
||||
When you have enabled this feature (via System Settings -> CPU Saving) you can use the custom fields
|
||||
in your Topic View skin.<br />Simply add <strong>\$author[field_1]</strong> (or whatever the corresponding 'Topicview var.' is) in 'Post Entry'
|
||||
where you would like it to be shown";
|
||||
|
||||
$SKIN->td_header[] = array( "Field Title" , "20%" );
|
||||
$SKIN->td_header[] = array( "Type" , "10%" );
|
||||
$SKIN->td_header[] = array( "TopicView var." , "20%" );
|
||||
$SKIN->td_header[] = array( "REQUIRED" , "10%" );
|
||||
$SKIN->td_header[] = array( "HIDDEN" , "10%" );
|
||||
$SKIN->td_header[] = array( "SHOW REG" , "10%" );
|
||||
@@ -411,6 +436,7 @@ class ad_fields {
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$r['ftitle']}</b>" ,
|
||||
"<center>{$real_types[$r['ftype']]}</center>",
|
||||
"<center>field_".$r['fid']."</center>",
|
||||
$req,
|
||||
$hide,
|
||||
$regi,
|
||||
@@ -422,10 +448,10 @@ class ad_fields {
|
||||
}
|
||||
else
|
||||
{
|
||||
$ADMIN->html .= $SKIN->add_td_basic("None found", "center", "tdrow2");
|
||||
$ADMIN->html .= $SKIN->add_td_basic("None found", "center", "pformstrip");
|
||||
}
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_basic("<a href='{$ADMIN->base_url}&act=field&code=add'>ADD NEW FIELD</a></center>", "center", "title");
|
||||
$ADMIN->html .= $SKIN->add_td_basic("<a href='{$ADMIN->base_url}&act=field&code=add' class='fauxbutton'>ADD NEW FIELD</a></center>", "center", "pformstrip");
|
||||
|
||||
$ADMIN->html .= $SKIN->end_table();
|
||||
|
||||
|
||||
Reference in new issue
Block a user