Menu
Main Links  Main Links
News  News
Info  Info
Users & Groups  Users & Groups
Style  Style
Language  Language
RSS Feeds  RSS Feeds
CUSTOMIZATION - How To Change Registration Date Format 
OPEN: ip_root/language/your_language/lang_main_settings.php

FIND:

Code: [Hide] [Select]
$lang['JOINED_DATE_FORMAT'] = 'F Y'; // Date format of Joined date, php date() format


REPLACE WITH:

Code: [Hide] [Select]
$lang['JOINED_DATE_FORMAT'] = 'M d, Y g:i a'; // Date format of Joined date, php date() format


This will produce this result:

date

If you would like to remove the exact time a user registered and just keep the Month/Day/Year, try this.

OPEN: ip_root/language/your_language/lang_main_settings.php

FIND:

Code: [Hide] [Select]
$lang['JOINED_DATE_FORMAT'] = 'F Y'; // Date format of Joined date, php date() format


REPLACE WITH:

Code: [Hide] [Select]
$lang['JOINED_DATE_FORMAT'] = 'M d, Y'; // Date format of Joined date, php date() format


This will produce this result:

date1

For more PHP date formats, please visit: http://us.php.net/date




  
 Chaotic [ Sat 14 Feb, 2009 10:35 ] Reply to this News Item Print this Topic E-Mail this Topic  

BBCODE - CUSTOMIZATION - DANGEROUS - How To Allow IFRAME And Full HTML Parsing 
Since some users are asking how to destroy their sites... I've decided to help them in this task.

Here is a way to enable IFRAME and more generally full HTML code in posts... I'm strongly against this modification, and I strongly invite all of you to not apply this unless you know very well what you are doing and the risk you are facing.

There will be no support for this... and I take no responsibility for all the damage that may arise on your site and your PC... yes your PC as well could be attacked and damaged by enabling this.

Creating IFRAME BBCode:
Spoiler: [ Show ]


Enabling HTML tags:
Spoiler: [ Show ]



How to generally allow full HTML in posts:
Spoiler: [ Show ]


Read again carefully the first lines of this post before proceding... do you really want to proceed? The whole risk is up to you... Good Luck!!! :roll:




  
 Mighty Gorgon [ Fri 29 Jun, 2007 00:25 ] Reply to this News Item Print this Topic E-Mail this Topic  

Icy Phoenix API - Demo 
Here is a Demo of an API you can use to fetch content within Icy Phoenix.

This demo is just to fetch the content of a topic:

Code: [Hide] [Select]
<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/GPL-license.php GNU Public License
*
*/

define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);

// Define constant to keep page_header.php from sending headers
define('AJAX_HEADERS', true);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management

// Usage examples
/*

Display topic content
mode => topic
http://localhost/ip/api/api.php?mode=topic&topic_id=2

topic_id = topic id

*/

// CLASS API - BEGIN
/**
* Class to provide data to other features/app
*/
class class_api
{

/**
* Class init
*/
function class_api()
{

}

/**
* Get Forums
*/
function get_forums($forums_array)
{
global $db, $cache, $config, $template, $user, $lang;

$sql = "SELECT f.* FROM " . FORUMS_TABLE . " f WHERE " . $db->sql_in_set('f.forum_id', $forums_array);
$result = $db->sql_query($sql, 86400, 'forums_list_', FORUMS_CACHE_FOLDER);
$forums_data = array();
while($row = $db->sql_fetchrow($result))
{
$forums_data[$row['forum_id']] = $row;
}
$db->sql_freeresult($result);

return $forums_data;
}

/**
* Get topic
*/
function get_topic($topic_id)
{
global $db, $cache, $config, $template, $user, $lang;

$sql = "SELECT t.*, p.*, u.*
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
WHERE t.topic_id = " . $topic_id . "
AND p.post_id = t.topic_first_post_id
AND u.user_id = t.topic_poster
LIMIT 1";
$result = $db->sql_query($sql);
$topic_data = array();
if (!empty($result))
{
$topic_data = $db->sql_fetchrow($result);
}
$db->sql_freeresult($result);

return $topic_data;
}

}

$class_api = new class_api();
// CLASS API - END

// CONFIG - BEGIN
$full_server_url = create_server_url();
$table_fields = array(
'tag_count' => array('lang_key' => 'TAG_COUNT', 'view_level' => AUTH_ALL),
'tag_text' => array('lang_key' => 'TAG_TEXT', 'view_level' => AUTH_ALL),
);
// CONFIG - END

// VARS - BEGIN
$topic_id = request_var('topic_id', 0);

$mode_types = array('main', 'cats', 'cat', 'tags', 'tags_all', 'authors', 'authors_topics', 'topic');
$mode = request_var('mode', $mode_types[0]);
$mode = check_var_value($mode, $mode_types);

$start = request_var('start', 0);
$start = ($start < 0) ? 0 : $start;

$per_page = request_var('per_page', 0);
$per_page = (empty($per_page) || ($per_page < 10) || ($per_page > 200)) ? $config['topics_per_page'] : $per_page;

$s_hidden_fields = '';

// SORT ORDER - BEGIN
$sort_order_array = array();
switch ($mode)
{
case 'authors':
$sort_order_array = array('alpha', 'number');
break;

default:
$sort_order_array = array();
break;
}
$sort_order = request_var('sort_order', $sort_order_array[0]);
$sort_order = (in_array($sort_order, $sort_order_array) ? $sort_order : $sort_order_array[0]);
// SORT ORDER - END

// SORT DIR - BEGIN
$sort_dir = request_var('sort_dir', 'DESC');
$sort_dir = (strtoupper($sort_dir) == 'ASC') ? 'ASC' : 'DESC';
// SORT DIR - END
// VARS - END

// ARRAY BASICS - BEGIN
$result_array = array();

$post_url_empty = $full_server_url . CMS_PAGE_VIEWTOPIC . '?' . POST_POST_URL . '={POST_ID}';
$print_url_empty = $full_server_url . 'printview.' . PHP_EXT . '?' . POST_POST_URL . '={POST_ID}';
$single_post_url_empty = $full_server_url . 'show_post.' . PHP_EXT . '?mob=1&light_view=1&' . POST_POST_URL . '={POST_ID}';
$result_array['url_post'] = $post_url_empty;
$result_array['url_print'] = $print_url_empty;
$result_array['url_single_post'] = $single_post_url_empty;
// ARRAY BASICS - END

if ($mode == 'topic')
{
if (!empty($topic_id))
{
include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);

$topic_data = $class_api->get_topic($topic_id);

$forum_id = $topic_data['forum_id'];
$topic_id = $topic_data['topic_id'];
$post_id = $topic_data['topic_first_post_id'];
$forum_id_append = (!empty($forum_id) ? (POST_FORUM_URL . '=' . $forum_id) : '');
$topic_id_append = (!empty($topic_id) ? (POST_TOPIC_URL . '=' . $topic_id) : '');
$post_id_append = (!empty($post_id) ? (POST_POST_URL . '=' . $post_id) : '');
$views = $topic_data['topic_views'];
$replies = $topic_data['topic_replies'];

$topic_title = $topic_data['topic_title'];
// Convert and clean special chars!
$topic_title = htmlspecialchars_clean($topic_title);

$first_time = create_date_ip($lang['DATE_FORMAT_VF'], $topic_data['topic_time'], $config['board_timezone'], true);
$last_time = create_date_ip($config['default_dateformat'], $topic_data['topic_last_post_time'], $config['board_timezone']);

$forum_url = $full_server_url . CMS_PAGE_VIEWFORUM . '?' . $forum_id_append;
$topic_url = $full_server_url . CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&amp;' . $topic_id_append;
$post_url = $full_server_url . CMS_PAGE_VIEWTOPIC . '?' . $post_id_append;
$single_post_url = $single_post_url_empty . $post_id;

$cat_id = $cis_reverse_cats[$forum_id];
$is_gf = in_array($forum_id, $cats_all_gf) ? true : false;
$topic_img = $full_server_url . '_api/' . $cat_id . ($is_gf ? '_gf' : '') . '.png';
$forum_title = ucwords(str_replace('_', ' ', $cat_id));

$message = $topic_data['post_text'];
$message_compiled = (empty($topic_data['post_text_compiled']) || !empty($config['posts_precompiled'])) ? false : $topic_data['post_text_compiled'];
$message = censor_text($message);

$bbcode->allow_html = (($config['allow_html'] && $topic_data['enable_html']) ? true : false);
$bbcode->allow_bbcode = (($config['allow_bbcode'] && $topic_data['enable_bbcode']) ? true : false);
$bbcode->allow_smilies = (($config['allow_smilies'] && $topic_data['enable_smilies']) ? true : false);

if($message_compiled === false)
{
$bbcode->code_post_id = $topic_data['post_id'];
$message = $bbcode->parse($message);
$bbcode->code_post_id = 0;
if (empty($bbcode->allow_bbcode))
{
$message = str_replace("\n", "<br />", preg_replace("/\r\n/", "\n", $message));
}
}
else
{
$message = $message_compiled;
}

/*
if ($topic_data['enable_autolinks_acronyms'])
{
$message = $bbcode->acronym_pass($message);
$message = $bbcode->autolink_text($message, $forum_id);
}
*/

if (!empty($strip_tags))
{
$allowed_tags = '<p><b><i><u><a><ul><ol><li><h1><h2><h3><h4><h5><h6>';
$message = strip_tags($message, $allowed_tags);
}

$result_array['items'][] = array(
'forum_id' => $forum_id,
'topic_id' => $topic_id,
'post_id' => $post_id,
'gf' => ($is_gf ? 1 : 0),
'category' => $forum_title,
'title' => $topic_title,
'url' => $topic_url,
'single_post_url' => $single_post_url,
'message' => $message,
'thumb' => $topic_img,
'replies' => $replies,
'views' => $views,
'tags' => $topic_data['topic_tags'],
'first_time' => $first_time,
'first_author' => $topic_data['topic_first_poster_name'],
'last_time' => $last_time,
'last_author' => $topic_data['topic_last_poster_name'],
);

$result_array['email_text'] = $api_lang['email_text'];
$result_array['count'] = sizeof($result_array['items']);
}
}

AJAX_headers(true);
echo json_encode($result_array) . "\n\n";
flush();
garbage_collection();
exit_handler();
exit;

?>




  
 Mighty Gorgon [ Mon 17 Feb, 2014 22:20 ] Reply to this News Item Print this Topic E-Mail this Topic  

DB - How To Add Tables To Database 
[DOC] How To Add Tables To Database

So you've found a new modification that you'd like to use on your Icy Phoenix website? Many modifications you'll find here and on other websites will have special instructions letting you know you'll be adding new or altering some tables to your database. For those type of modifications to work, you'll need to update your database.

Assuming you know how to access your Icy Phoenix database, look to see what your tables are prefixed with. If you installed Icy Phoenix using the default prefix, your database tables will have "ip_" in front of them. Many users are used to prefixing their tables with the "phpbb_" prefix. In fact, it doesn't matter what you use as your prefix when installing a fresh copy of Icy Phoenix. What matters is you are consistent and remember to name all future prefixes the way you started.

When viewing the install instructions inside a modification folder, you may see something similar to this:

Spoiler: [ Show ]


Notice the lines that detail the prefixes such as:

Code: [Hide] [Select]
CREATE TABLE `ip_medal` (


Code: [Hide] [Select]
CREATE TABLE `ip_medal_user` (


Code: [Hide] [Select]
CREATE TABLE `ip_medal_mod` (


Code: [Hide] [Select]
CREATE TABLE `ip_medal_cat` (


Code: [Hide] [Select]
INSERT INTO `ip_config` VALUES ('allow_medal_display', '0');
INSERT INTO `ip_config` VALUES ('medal_display_row', '1');
INSERT INTO `ip_config` VALUES ('medal_display_col', '3');
INSERT INTO `ip_config` VALUES ('medal_display_width', '');
INSERT INTO `ip_config` VALUES ('medal_display_height', '');
INSERT INTO `ip_config` VALUES ('medal_display_order', '');
INSERT INTO `ip_medal_cat` VALUES ('1', 'Default', '10');


Clearly the prefix that is used in this example is "ip_". What if your database prefixes are not "ip_"? You simply change the "ip_" prefix in the install instructions to whatever your prefix is.

If your table prefix is "ilovedogs_", you would need to turn these install instructions into this:

Spoiler: [ Show ]


prefix1
In the picture to the right, my database tables are prefixed with "phpbb_". Since my table prefix is "phpbb_", I must make sure that I change these install instructions to fit my prefix.

Once you have changed the prefixes to suit your needs, we're ready to add them to the database. Using MySQL, click the SQL tab at the top of the page. Copy and paste the whole command or just copy each block separately. I took the following SQL, added it, and you can do the same:





















Code: [Hide] [Select]
CREATE TABLE `phpbb_medal` (
`medal_id` mediumint(8) UNSIGNED NOT NULL auto_increment,
`cat_id` mediumint(8) UNSIGNED NOT NULL default '1',
`medal_name` varchar(40) NOT NULL,
`medal_description` varchar(255) NOT NULL,
`medal_image` varchar(40) NULL,
PRIMARY KEY (`medal_id`)
);


I was then told "Your SQL query has been executed successfully (Query took 0.0137 sec)".








sql

Keep following the special SQL instructions in the install file until you are finished.




  
 Chaotic [ Sat 22 Aug, 2009 00:15 ] Reply to this News Item Print this Topic E-Mail this Topic  

New Optimized Version Up And Running... 
Hi all,
this short message just to announce that today I have upgraded this site with an optimized version of Icy Phoenix which should better manage memory loads in non-forum pages... so you should notice some improvements in navigating.

Since I made so many modifications there could be some new bugs... :roll:

Should you encounter some new bugs, plese write here.

Thank you.




  
 Mighty Gorgon [ Sat 26 Apr, 2008 22:23 ] Reply to this News Item Print this Topic E-Mail this Topic  

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.2377s (PHP: 16% SQL: 84%)
SQL queries: 11 - Debug Off - GZIP Enabled