mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
XURL definitions added for facebook, twitter etc.
This commit is contained in:
@@ -992,35 +992,37 @@ $text .= "
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan='2'>External Social Pages</th>
|
<th colspan='2'>External Social Pages</th>
|
||||||
</tr>
|
</tr>";
|
||||||
|
|
||||||
|
//XXX XURL Definitions.
|
||||||
|
|
||||||
|
$xurls = array(
|
||||||
|
'facebook' => array('label'=>"Facebook", "placeholder"=>"eg. https://www.facebook.com/e107CMS"),
|
||||||
|
'twitter' => array('label'=>"Twitter", "placeholder"=>"eg. https://twitter.com/e107"),
|
||||||
|
'youtube' => array('label'=>"Youtube", "placeholder"=>"eg.https://youtube.com/e107Inc"),
|
||||||
|
'google' => array('label'=>"Google+", "placeholder"=>"eg.. "),
|
||||||
|
'linkedin' => array('label'=>"LinkedIn", "placeholder"=>"eg. http://www.linkedin.com/groups?home=&gid=1782682")
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach($xurls as $k=>$var)
|
||||||
|
{
|
||||||
|
$keypref = "xurl[".$k."]";
|
||||||
|
$def = "XURL_". strtoupper($k);
|
||||||
|
|
||||||
|
$opts = array('size'=>'xxlarge','placeholder'=> $var['placeholder']);
|
||||||
|
|
||||||
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td>Your Facebook page</td>
|
<td>Your ".$var['label']." page</td>
|
||||||
<td>
|
<td>
|
||||||
".$frm->text('facebook_link', $pref['facebook_link'])."
|
".$frm->text($keypref, $pref['xurl'][$k], false, $opts)."
|
||||||
<div class='field-help'>Used in some themes to provide a link to your Facebook page. (FACEBOOK_LINK)</div>
|
<div class='field-help'>Used by some themes to provide a link to your ".$var['label']." page. (".$def.")</div>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Your Twitter page</td>
|
|
||||||
<td>
|
|
||||||
".$frm->text('twitter_link', $pref['twitter_link'])."
|
|
||||||
<div class='field-help'>Used in some themes to provide a link to your Twitter page. (TWITTER_LINK)</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Your Youtube page</td>
|
|
||||||
<td>
|
|
||||||
".$frm->text('youtube_link', $pref['youtube_link'])."
|
|
||||||
<div class='field-help'>Used in some themes to provide a link to your Youtube page. (YOUTUBE_LINK)</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Your Google+ page</td>
|
|
||||||
<td>
|
|
||||||
".$frm->text('google_link', $pref['google_link'])."
|
|
||||||
<div class='field-help'>Used in some themes to provide a link to your Google+ page. (GOOGLE_LINK)</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan='2'>Social Logins</th>
|
<th colspan='2'>Social Logins</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -223,11 +223,14 @@ function update_check()
|
|||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
function update_core_prefs($type='')
|
function update_core_prefs($type='')
|
||||||
{
|
{
|
||||||
global $pref, $e107info;
|
$pref = e107::getPref();
|
||||||
|
global $e107info;
|
||||||
$admin_log = e107::getAdminLog();
|
$admin_log = e107::getAdminLog();
|
||||||
$do_save = FALSE;
|
$do_save = FALSE;
|
||||||
$should = get_default_prefs();
|
$should = get_default_prefs();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$just_check = $type == 'do' ? FALSE : TRUE; // TRUE if we're just seeing if an update is needed
|
$just_check = $type == 'do' ? FALSE : TRUE; // TRUE if we're just seeing if an update is needed
|
||||||
|
|
||||||
foreach ($should as $k => $v)
|
foreach ($should as $k => $v)
|
||||||
|
@@ -341,6 +341,7 @@ City, State, Country
|
|||||||
<core name="wmessage_sc">0</core>
|
<core name="wmessage_sc">0</core>
|
||||||
<core name="wysiwyg">1</core>
|
<core name="wysiwyg">1</core>
|
||||||
<core name="xup_enabled">1</core>
|
<core name="xup_enabled">1</core>
|
||||||
|
<core name="xurl">1</core>
|
||||||
<core name="xmlfeed_languagepacks">http://www.e107.org/themeupdate.php</core>
|
<core name="xmlfeed_languagepacks">http://www.e107.org/themeupdate.php</core>
|
||||||
<core name="xmlfeed_security">http://www.e107.org/themeupdate.php</core>
|
<core name="xmlfeed_security">http://www.e107.org/themeupdate.php</core>
|
||||||
<emote name="alien!png">!alien</emote>
|
<emote name="alien!png">!alien</emote>
|
||||||
|
@@ -2606,6 +2606,8 @@ class e107
|
|||||||
define('e_UC_ADMIN', 254);
|
define('e_UC_ADMIN', 254);
|
||||||
define('e_UC_NOBODY', 255);
|
define('e_UC_NOBODY', 255);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2966,6 +2968,14 @@ class e107
|
|||||||
define('e_LOGIN', SITEURL.(file_exists(e_BASE.'customlogin.php') ? 'customlogin.php' : 'login.php'));
|
define('e_LOGIN', SITEURL.(file_exists(e_BASE.'customlogin.php') ? 'customlogin.php' : 'login.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pref = e107::getPref('xurl');
|
||||||
|
|
||||||
|
define('XURL_FACEBOOK', vartrue($pref['facebook'],false));
|
||||||
|
define('XURL_TWITTER', vartrue($pref['twitter'],false));
|
||||||
|
define('XURL_YOUTUBE', vartrue($pref['youtube'],false));
|
||||||
|
define('XURL_GOOGLE', vartrue($pref['google'],false));
|
||||||
|
define('XURL_LINKEDIN', vartrue($pref['linkedin'],false));
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -221,17 +221,17 @@ class e_form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(vartrue($options['size']) && is_numeric($options['size']))
|
if(vartrue($options['size']) && !is_numeric($options['size']))
|
||||||
{
|
{
|
||||||
$options['class'] .= " input-".$options['size'];
|
$options['class'] .= " input-".$options['size'];
|
||||||
unset($options['size']); // don't include in html 'size='.
|
unset($options['size']); // don't include in html 'size='.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mlength = vartrue($maxlength) ? "maxlength=".$maxlength : "";
|
||||||
|
|
||||||
$options = $this->format_options('text', $name, $options);
|
$options = $this->format_options('text', $name, $options);
|
||||||
//never allow id in format name-value for text fields
|
//never allow id in format name-value for text fields
|
||||||
return "<input type='text' name='{$name}' value='{$value}' maxlength='{$maxlength}'".$this->get_attributes($options, $name)." />";
|
return "<input type='text' name='{$name}' value='{$value}' {$mlength} ".$this->get_attributes($options, $name)." />";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user