TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 05:55:54 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 304
  • Total: 305
  • @rjen

Blok yazılımcıkları (Block Snippets)

Started by sarba126, March 29, 2006, 07:59:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alp

'In The News' - Block [Posts from a specific board]
bu blok sizin seçtiğiniz bölümden haberleri değişik bir şekilde göstermeye yarıyor


ekran görüntüsü:
   
'In The News' - Block [Posts from a specific board]
SSI.php de bul
// Show the top poster's name and profile link.
üstüne ekle


// Recent topic list reversed:   [board] Subject by Poster Date
function ssi_recentTopicsINC($num_recent = 8, $include_boards = null, $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER, $user_info, $modSettings;

$include_boards = empty($include_boards) ? array() : $include_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE t.ID_LAST_MSG >= " . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . "
AND t.ID_LAST_MSG = m.ID_MSG
AND b.ID_BOARD = t.ID_BOARD" . (empty($include_boards) ? '' : "
AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")") . "
" . ((!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0) ? "
AND b.ID_BOARD != '$modSettings[recycle_board]'" : '') . "
AND $user_info[query_see_board]
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY t.ID_LAST_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '')));
if (strlen($row['body']) > 128)
$row['body'] = substr($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
}


**************
resmi ana dizine atın

************

php box oluşturun bir tane,kodu içine kopyalayın


echo' <div align="center">
<table border="1" width="100%" id="table1">
<tr>
<td width="100" valign="top" bgcolor="#FFFFFF">
<font face="Verdana">
<img border="0" src="extra.gif" width="100" height="111"></font><p align="center">
<font size="1" face="Verdana">Read, post and discuss the latest news from around the
world in our forums!</font></p>
<p align="center"><font size="1" face="Verdana">Get all the details by comparing views!</font></td>
<td><font face="Verdana">';

global $context, $scripturl;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$result=ssi_recentTopicsINC(5,array(58),'return');
foreach($result as $my){

  echo "$bullet";
  echo '<span class="largetext">'.$my['link'];
  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
echo '
                                                <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['newtime'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '<hr>';
}
echo '</span>';

echo'   <br></font><font size="1" face="Verdana">The News is updated
when members make new posts in the <a href="http://www.yoursite.com/link_to_your_newsboard">In the News Section</a> Please be sure
to <a href="http://www.yoursite.com/if_u_have_posting_rules_give_link_here">read posting rules</a> for that board before posting!</font></td>
</tr>
</table>
</div>';

kendinize göre bazı kısımları editleyin(www.yoursite.com/ gibi)

   
$result=ssi_recentTopicsINC(5,array(58),'return');

5 = number of topics to display (kaç tane haber gösterecekseniz o rakamı girin)
58 = board number (bölüm numarası)

alp

En son üye avatarlı gösterimi  (Newest member block with Avatar image which links to their profile)
bu bloc ile en son üyeniz avatarlı bir şekilde gösterilecektir.


bir php bloc oluşturun bu kodu onun içine yapıştırın.


global $db_prefix;
$query = "SELECT avatar FROM {$db_prefix}members WHERE ID_MEMBER =
".$context['common_stats']['latest_member']['id'];
$exec = db_query($query);
$row = mysql_fetch_assoc($exec);
echo "<div align='center'><img src='/avatars/".$row['avatar']."' alt='".$context['common_stats']['latest_member']['name']."'><BR>".$context['common_stats']['latest_member']['link']."</div>";
mysql_free_result($exec);


avatar çıkmadı derseniz avatar yolu bu img src='/avatars/ ona dikkat edin

alp

Custom Page (kiÅŸisel sayfa)
portalınız ayarladığınız yerde bunun gibi bir kişisel sayfa imkanı verir
http://img519.imageshack.us/img519/2021/customfs3.jpg
boyutlarını ayarlayabiliyorsunuz

oluşan sayfanın boyutunun ayarları için bunları değiştirin
$cp_width = "100%";
$cp_height = 600;


php blok oluşturun bu kodu yapıştırın.
//////////////////////////////////////////////
// Custom Page 1.05
// Developed by Thurnok
// Complete Computer Services
// August 27, 2006
//
// Last updated - January 27, 2007
// - fix for PHP 5.x
//
// Custom Page allows you to give your users the ability to display
// a page of their choice in a centerblock or article based on their User ID.
// This project was developed due to a request on TinyPortal site for
// a centerblock that would display the currently logged in user's
// myspace site.
//
// This version allows your members to choose whether to allow other members
// to view their custom page or not.  Other members can use a pulldown to select
// a member that has their custom page set to public and hence view that member's page.
// It also updates your custompage table to accommodate this automatically.
//
// This script will create a table for the custom page using your current
// SMF table prefix followed by custompage (ex: smf_custompage) and using your
// current database credential information.
// NOTE: Your database user/permissions used for SMF must allow you to
// create a table or you will never be able to store the info.  You
// can create the table manually if necessary.
//
// Also note that a mysql connection is already alive and so creating a new connection
// and closing it is undesirable and causes problems in other blocks.  Therefore,
// you will notice the absence of mysql_connect() and mysql_close() functions
// used in this snippet.
//////////////////////////////////////////////

// User Configurable items

//   *****   LAYOUT OPTIONS   *****
// an IFRAME is necessary to keep the page "within" your site
// width and height of the IFRAME in your center block
$cp_width = "100%";
$cp_height = 600;

//   *****   SECURITY CONFIGURATION   *****
// Groups allowed to select and set their custom page
// This is in the form of their Group ID - example: array('3', '6', '9');
$cp_allowed_groups = array('');
// individual members not allowed to use even if in an allowed group
// uses the member ID - example: array('91', '16');
$cp_disallowed_members = array('');
// whether or not to allow users to make their site public
$cp_allow_public = true;

//   *****   DEFAULT STUFF   *****
// if the user is not allowed, or doesn't have a custom page yet, what
// page do you want to display to them in the IFRAME?
$cp_default_page = "http://www.google.com";

// whether to display the default page if not allowed or no page yet (set to a true value)
// or to not display any page in the block, only the form (set to a false value)
$cp_display_default = 1;

// if $cp_display_default = 0 (or some false value), and user doesn't have a page set,
// display this default text where the IFRAME would have been
$cp_default_text = "You currently do not have a custom page selected.<br />
Please use the form below to select a page.<br />
If you do not see the form below, it is because you do not have access to create a custom page.";

// you can set the tablename to other than custompage if you like
$cp_tablename = "custompage";
// and the title displayed
$cp_title = "Custom Page!";
// add some descriptive text here if you like to display under title
$cp_desc = "Your MySpace right here!  Use the form below to set your custom page.";

// if user's browser does not support IFRAMEs, display this where it would be
$cp_no_iframe = "<h1>Custom Page!</h1>
Your browser does not support IFRAMEs.  You should get a better browser to see what you are missing!<br />
Check out Mozilla or Firefox, they are great!<br />";


// Print our title - or comment the line to not display a title
echo '<center><b>' . $cp_title . '</b></center><br />';
echo '<font size=1>' . $cp_desc . '</font><p />';

//////////////////////////////////////////////
//
// The rest of this you should leave as is
// unless you are overly industrious :)
//
//////////////////////////////////////////////
// globals for database vars
global $db_prefix;
// globals for user information
global $context, $user_info, $ID_MEMBER;

$cp_id = $ID_MEMBER;
$cp_admin = false;

// set up all our functions ahead of time
// function to create table if not already there
function CustomPageCreateTable($cp_tablename) {
// set up the query that will create the table appropriately
$dbquery = "CREATE table $cp_tablename (id INT UNSIGNED NOT NULL PRIMARY KEY,
url TEXT, public tinyint(1) NOT NULL default '0', selected_user INT UNSIGNED);";
if (!mysql_query($dbquery)) {
die("Query Failed!  Table NOT Created!<br />\n");
}
}

// function to modify table to add "public" and "selected_user" columns
function CustomPageModifyTable($cp_tablename) {
// set up the query that will modify the table appropriately
$dbquery = "ALTER TABLE $cp_tablename ADD (public tinyint(1) NOT NULL default '0', selected_user INT UNSIGNED);";
if (!mysql_query($dbquery)) {
if (mysql_errno() == 1060){
// just a double precaution as part of the NULL fix :)
} else {
die("Query Failed!  Table NOT Modified!<br />\n" . mysql_errno() . ": " . mysql_error());
}
}
}

// function to add/edit a user and their custom page to/in the table
function CustomPageAdd($cp_tablename, $cp_id, $cp_url, $cp_selected_user, $cp_public=0) {
if ($cp_url != ''){
if (strtolower(substr($cp_url, 0, 7)) != "http://"){
$cp_url = "http://" . $cp_url;
}
}
// only add user if they do not already exist
$dbquery = "SELECT * FROM $cp_tablename
WHERE id = '" . $cp_id . "'";
$dbresult = mysql_query($dbquery);
if ($dbresult){
if ($row = mysql_fetch_assoc($dbresult)){
// if a row is found, then there's already this user in table, edit instead
CustomPageEdit($cp_tablename, $cp_id, $cp_url, $cp_selected_user, $cp_public);
return;
}
}
$dbquery = 'INSERT INTO '.$cp_tablename.' VALUES ('.$cp_id.', "'.$cp_url.'", '.$cp_public.', '.$cp_selected_user.');';
if (!mysql_query($dbquery)) {
die("Query Failed!  Custom Page NOT Inserted into database!<br />\n");
}
}

// function to edit a user's custom page in the table
function CustomPageEdit($cp_tablename, $cp_id, $cp_url, $cp_selected_user, $cp_public=0) {
// start our dbquery
$dbquery = "UPDATE $cp_tablename ";
// if no URL supplied, don't edit the URL
if ($cp_url != ''){
// add HTTP:// if necessary at front of link to prevent BASE URL applying in front of link provided
if (strtolower(substr($cp_url, 0, 7)) != "http://"){
$cp_url = "http://" . $cp_url;
}
// since an url was entered, add it to the update
$dbquery .= 'SET url = "'.$cp_url.'", public = '.$cp_public.', selected_user = '.$cp_selected_user.'
WHERE id = '.$cp_id.';';
} else {
// update all but the URL
$dbquery .= "SET public = $cp_public, selected_user = $cp_selected_user
WHERE id = $cp_id;";
}
if (!mysql_query($dbquery)) {
die("Query Failed!  Custom Page NOT Modified in database!<br />\n");
}
}

// function to delete Custom Page from the table
function CustomPageDel($cp_tablename, $cp_selected_user) {
// delete Custom Page with $cp_id
$dbquery = "DELETE FROM $cp_tablename WHERE id = $cp_selected_user;";
if (!mysql_query($dbquery)) {
die("Query Failed!  Custom Page NOT Deleted from database!<br />\n");
}
}


///////////  MAIN CODE HERE  ////////////
// Admins are always allowed to create a custom page
if ($context['user']['is_admin']){
$cp_admin = 1;
}

// convert $_POST vars to prevent undefined index errors
$cp_save = empty($_POST['cp_save']) ? '' : $_POST['cp_save'];
$cp_del = empty($_POST['cp_del']) ? '' : $_POST['cp_del'];
$cp_urlbox = empty($_POST['cp_urlbox']) ? '' : $_POST['cp_urlbox'];
$cp_public = empty($_POST['cp_public']) ? 0 : $_POST['cp_public'];
$cp_selected_user = empty($_POST['cp_selected_user']) || (!$cp_allow_public && !$cp_admin) ? $ID_MEMBER : $_POST['cp_selected_user'];

// get our script url including parameters (like ?page=6)
$myself = $_SERVER['REQUEST_URL'];

// put the SMF table prefix in front of your tablename from above
$cp_tablename = $db_prefix . $cp_tablename;
// do same for SMF Members table
$smf_members_table = $db_prefix . 'members';


////////////////   Security Checks  ////////////////
// check if user is in a group that is allowed to set a custom page
$cp_allowed = array_intersect($cp_allowed_groups, $user_info['groups']);

// don't let guests set page - would set default for all guests if they did
// also check if user is in the disallow array
if ($context['user']['is_guest'] || @in_array($ID_MEMBER, $cp_disallowed_members)){
$cp_allowed = false;
}

// Admins are always allowed to create a custom page
if ($cp_admin){
$cp_allowed = 1;
}
//////////////////////////////////////////////

// if someone just clicked Save, post info to database
if (!empty($cp_save) && $cp_allowed){
// if the urlbox had info in it, trim it
if (!empty($cp_urlbox)){
$cp_urlbox = trim($cp_urlbox);
} else {
$cp_urlbox = '';
}
CustomPageAdd($cp_tablename, $cp_id, $cp_urlbox, $cp_selected_user, $cp_public);
}

// if someone just deleted a page, remove it from database
if ($cp_del && $cp_admin){
CustomPageDel($cp_tablename, $cp_del);
}

////////////  MAIN DISPLAY CODE HERE  ///////////////
// set query to select all data for all users
$dbquery = "SELECT * FROM $cp_tablename;";
$dbresult = mysql_query($dbquery);

if ($dbresult){
// table exists - does it need an upate?
$row = mysql_fetch_assoc($dbresult);
if (in_array("public", array_keys($row))){
// no update needed here!
mysql_data_seek($dbresult, 0);
} else {
// YES!  then create the columns!
mysql_free_result($dbquery);
CustomPageModifyTable($cp_tablename);
// re-query the modified table
$dbresult = mysql_query($dbquery);
if (!$dbresult){
die("Unexpected error: " . mysql_error());
}
}
} else {
// no result, is it because table doesn't exist?
if (mysql_errno() == 1146){
// table doesn't exist, create it!
CustomPageCreateTable($cp_tablename);
// get our result again
$dbresult = mysql_query($dbquery);
if (!$dbresult) die("Unexpected error: " . mysql_error());
} else {
die("Unexpected error: " . mysql_error());
}
}

$cp_page = '';
$cp_selected_user = $ID_MEMBER;
$cp_selected_page = '';
// cycle through all rows
while ($row = mysql_fetch_assoc($dbresult)){
// add to public pages array if they have set to public (but not ourselves)
// or if the current user is an admin
if (($row["public"] != 0 || $cp_admin) && $row["id"] != $ID_MEMBER){
$cp_public_pages[$row["id"]] = $row["url"];
}
// if our row, get our public status, url, and our selected user
if ($row["id"] == $ID_MEMBER){
$cp_public = $row["public"];
$cp_page = $row["url"];
$cp_urlbox = $cp_page;
$cp_selected_user = $row["selected_user"];
}
}
$cp_public == 0 ? $cp_checked = '' : $cp_checked = "CHECKED";

// free previous result set
mysql_free_result($dbresult);
// if there were some public pages in table, setup the public users array
if (!empty($cp_public_pages)){
$dbquery = "SELECT ID_MEMBER, memberName FROM $smf_members_table
WHERE ID_MEMBER IN (" . implode(",", array_keys($cp_public_pages)) . ");";
$dbresult = mysql_query($dbquery);
if (!$dbresult) die("Unexpected error: " . mysql_error());
$cp_public_users = array();
while ($row = mysql_fetch_assoc($dbresult)){
$cp_public_users[$row["ID_MEMBER"]] = $row["memberName"];
}
// free the result for good measure
mysql_free_result($dbresult);
}

// get our selected user's page
if (!empty($cp_public_pages) && @in_array($cp_selected_user, @array_keys($cp_public_pages))){
$cp_selected_page = $cp_public_pages[$cp_selected_user];
}
// if the selected page is null "" then select our own page if it not ""
if (empty($cp_selected_page)){
if (!empty($cp_page)){
$cp_selected_page = $cp_page;
} else {
$cp_display_default ? $cp_selected_page = $cp_default_page : $cp_selected_page = '';
}
}

// display the $cp_selected_page to the user
if (!empty($cp_selected_page)){
echo '<center><IFRAME NAME="CustomPage" ALIGN=middle SRC="' . $cp_selected_page . '" WIDTH=' . $cp_width . ' HEIGHT=' . $cp_height . '>
' . $cp_no_iframe . '
</IFRAME></center>';
} else {
if ($cp_display_default){
echo '<center><IFRAME id="CustomPageID" NAME="CustomPage" ALIGN=middle SRC="' . $cp_default_page . '" WIDTH=' . $cp_width . ' HEIGHT=' . $cp_height . '>
' . $cp_no_iframe . '
</IFRAME></center>';
} else {
echo '<br />' . $cp_default_text . '<p />';
}
}

// only show form if user is allowed to add/edit their custom page
if ($cp_allowed){
//////////////////////////////////////////////////////////////////
/////////////           Javascript area              /////////////
//////////////////////////////////////////////////////////////////
// write out our javascript stuff

echo '
<script type="text/javascript">
<!--
// create our main array first
var jarray = new Array(); // list of member ids from pull down
var jarray2 = new Array(); // public page user ids
var jarray3 = new Array(); // public page urls
var jarray4 = new Array(); // array of public page user ids => public page urls
jarray[0] = '.$ID_MEMBER.';
jarray4['.$ID_MEMBER.'] = "'.$cp_page.'";
';
if (!empty($cp_public_pages)){
// create a list of public page user ids
$cp_public_user_list = implode(",", array_keys($cp_public_users));
$cp_page_ids = implode(",", array_keys($cp_public_pages));
foreach($cp_public_pages AS $key => $value){
if (empty($cp_page_urls)){
$cp_page_urls = '"' . $value . '"';
} else {
$cp_page_urls .= ',"' . $value . '"';
}
}
echo '
jarray.push('.$cp_public_user_list.');
// if our javascript is huge, big bandwidth waster, save some bandwidth here
jarray2.push('.$cp_page_ids.');
jarray3.push('.$cp_page_urls.');
y = jarray2.length;
for (x=0;x<y;x++){
page_id = jarray2[x];
jarray4[page_id] = jarray3[x];
}
';
}
echo '
function selectedChanged(){
s_id = jarray[document.cp_form.cp_selected_user.selectedIndex];
s_url = jarray4[s_id];
window.frames.CustomPage.location.href = s_url;
}
//-->
</script>
';


// start our form and table
echo '
<p /><form name="cp_form" action="' . $myself . '" method=post>
<table width="100%" border=0>
<tr>
<td width="40%">My Custom Page info:</td>
<td width="10%"></td>
<td width="40%">Public Member Pages</td>
<td width="10%"></td>
</tr>
<tr>
<td width="40%">URL: <input type=text name=cp_urlbox size="50" value="' . $cp_urlbox . '" /></td>
<td width="10%"></td>
<td width="40%" align="left">
<select name=cp_selected_user onChange="selectedChanged()">';
if ($cp_selected_user == $ID_MEMBER){
echo '
<option value="'.$ID_MEMBER.'" SELECTED>' . $user_info["username"] . '</option>
';
} else {
echo '
<option value="'.$ID_MEMBER.'">' . $user_info["username"] . '</option>
';
}
if (!empty($cp_public_users)){
foreach ($cp_public_users as $key => $value){
echo '

';
if ($cp_selected_user == $key){
echo '
<option value="'.$key.'" SELECTED>' . $value . '</option>
';
} else {
echo '
<option value="'.$key.'">' . $value . '</option>
';
}
}
}
echo '
</select>
</td>
<td width="10%"></td>
</tr>
<tr>
<td width="40%"><label><input type=checkbox name=cp_public value="1" ' . $cp_checked . ' />Make my page public</label></td>
<td width="10%"></td>
<td width="40%"></td>
<td width="10%"></td>
</tr>
<tr>
<td colspan="4" align="center"><input type=submit name=cp_save value="Save" /></td>
</tr>
</table>
</form>
';
}

alp

Anlatımlar bana aittir bloclar ingilizce bölümden alınmıştır

alp

arkadaşınızı davet etmek (davetiye yollamak)


global $sourcedir, $user_info, $context, $settings ;

require_once($sourcedir . '/Subs.php');
require_once($sourcedir .'/Subs-Post.php');


///////////////////////////
// CONFIGURATION SECTION //
///////////////////////////


//Website address
$website_address= 'http://www.sanalworld.net';

//Admin email address
$admin_email_address= 'adminemail@yours.com';

//article to be redirected when form is submitted
$thank_you_article_id = '6';


/////////////////////////////////
//END OF CONFIGURATION SECTION //
/////////////////////////////////


$email_address= $_POST['fmail'];

$show_form= 'true';
if (isset($_POST['submitted'])) {
// Handle the form

// email the form

$subject = ' Arkadasiniz Sizi Davet Ediyor' . $_POST['real_name'] . '';
$body =
'Merhaba ' . $_POST['fname'] . '

' . $_POST['real_name'] . ' sizi kendi web sitesine davet ediyor ' . $website_address . '
Arkadasinin Mesaji
"' . $_POST['message'] . '"


Uye olmak icin linke tiklayiniz  http://www.sanalworld.net/index.php?action=register';



mail($email_address, $subject, $body,"From: " . $_POST['email']);

// Redirect to thank you page
header('Location: http://' . $_SERVER['HTTP_HOST'] .'/index.php?page=' . $thank_you_article_id);

}

//else { // Display the form
echo '
<br /><center>Arkadaşını Davet Et</center><hr>';
echo '
<form action="index.php?page='  . $this_article_id  . '" method="post">
        <INPUT id="submitted" name="submitted" type="hidden" value="TRUE" />
<TABLE class = "bordercolor" cellSpacing="1" cellPadding="1" width="95%" border="0">
<TR class ="windowbg">
<TD width = "180px">Nick:<br />
<INPUT id="real_name" name="real_name" type="text" value ="';
if (isset($_POST['real_name'])) echo $_POST['real_name'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "180px">Email Adresin:<br />
<INPUT id="email" name="email" type="text" value ="';
if (isset($_POST['email'])) echo $_POST['email']; else echo $user_info['email']; 
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "180px">Arkadaşının Nicki:<br />
<INPUT id="fname" name="fname" type="text" value ="';
if (isset($_POST['fname'])) echo $_POST['fname'];
echo '" /></TD>
</TR>
<TR class ="windowbg2">
<TD width = "180px">Arkadaşının Email Adresi:<br />
<INPUT id="fmail" name="fmail" type="text" value ="';
if (isset($_POST['fmail'])) echo $_POST['fmail'];   
echo '" /></TD>
</TR>
<TR class ="windowbg">
<TD width = "180px">Mesajın<br />
<TEXTAREA id="message" name = "message" rows="4" cols="20" value ="';
if (isset($_POST['message'])) echo $_POST['message'];   
echo '" ></' . 'TEXTAREA></TD>
</TR>
<TR class ="windowbg2">
<TD colspan="2" align="center">
<INPUT type="submit" value="Gönder">
<INPUT type="reset" value="Alanı Temizle"></TD>
</TR>
</TABLE>
</form>

';

Türkçeleştirmesini ben yaptım siz istiyorsanız kendinize değiştirin
sanalworld.net yazılı bir kaç yer var onları değiştirmeyi unutmayın
demo için: www.sanalworld.net i ziyaret edin

alp

kontrol paneli

dosyaları klasorden çıkartıp ana dizine atın
http://rapidshare.com/files/73144275/kontrolpaneli.rar
ekran görüntüsü


resimlerin üzerine tıklandığında açıklamalar geliyor.onları türkçe ye çevirip indireceğiniz dosyanın içinde.
--------
php box oluşturup kodları kopyalayın.

echo'
<head>
<SCRIPT language="JavaScript1.2" src="main.js" type="text/javascript"></SCRIPT>
</head>
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<SCRIPT language="JavaScript1.2" src="style.js" type="text/javascript"></SCRIPT>           
<div align="center"><table border="0" width="100%" style="border-collapse: collapse"><tr><td width="50%">
<table border="1" cellspacing="0" style="border-collapse: collapse">
<tr>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=account" onMouseOver="stm(Text[1],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/ksysguard.png"></a></font></td>


<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=forumProfile" onMouseOver="stm(Text[4],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kuser.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=statPanel" onMouseOver="stm(Text[5],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kwalletmanager.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=showPosts" onMouseOver="stm(Text[6],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kedit.png"></a></font></td>
<td align="center"valign="top">
</tr>
<tr>

<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=notification" onMouseOver="stm(Text[7],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/mailreminder.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=editBuddies" onMouseOver="stm(Text[8],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/kdmconfig.png"></a></font></td>
<td align="center"valign="top">
<font face="Verdana" size="2">
<a href="', $scripturl, '?action=profile;u=;sa=pmprefs" onMouseOver="stm(Text[9],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/mail.png"></a></font></td>
<td align="center"valign="top">
<a href="', $scripturl, '?action=search" onMouseOver="stm(Text[11],Style[1])" onMouseOut="htm()"><img border="0" src="usercp2/find.png"></a></td>

</tr>
</table></td></tr></table></div>
';


ingilizce bölümden alınmıştır kodlar türkçeye çeviri ve anlatım bana aittir

cakal93

#96
Quote from: alp on November 28, 2007, 07:52:33 PM
Accordion Style Menu Block  (deÄŸiÅŸik menuler)
bunu uyguladığınızda menuleriniz daha değişik bir stilde oluşacak


ana dizine atın (index.php olduğu yere)
http://rapidshare.com/files/65979139/mootools-accordion.js

demo: http://test.gforumx.com/smf1/
Accordion Menu Test ve Mini-User CP Accordion Test bunlara bakın bunun gibi olacak menuleriniz

Themes/<kendi teman>/index.template.php
bul

</head>

önüne ekle

<script type="text/javascript" src="mootools-accordion.js"></script>

<script type="text/javascript">
window.onload = function() {
var accordion = new Accordion(\'h3.atStart\', \'div.atStart\', {
opacity: false,
onActive: function(toggler, element){
toggler.setStyle(\'color\', \'#ff3300\');
},

onBackground: function(toggler, element){
toggler.setStyle(\'color\', \'#222\');
}
}, $(\'accordion\'));

}
</script>


Themes/senin teman/style.css

en baÅŸa ekle
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>

color: #222;
margin: 0;
padding: 2px 5px;
background: #eee;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
border-top: 1px solid #f5f5f5;
border-left: 1px solid #f5f5f5;
font-size: 11px;
font-weight: normal;
font-family: 'Andale Mono', sans-serif;
}

.element {

}

.element p {
margin: 0;
padding: 4px;
}

.float-right {
padding:10px 20px;
float:right;
}

blockquote {
padding:5px 0 5px 30px;
}

/* END! Accordion Style Menu Block */



script box oluştur içine kopyala
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>


kendinize göre editlemeyi unutmayın
<h3 class="toggler atStart">Test 1</h3>
<div class="element atStart">
This is a Test 1, if you want to know why, Don't ask me, This is not my fault, Hey after all this Is a test! :P
</div>


ana dizine atın
http://rapidshare.com/files/65979139/mootools-accordion.js

demo: http://test.gforumx.com/smf1/
Accordion Menu Test ve Mini-User CP Accordion Test bunlara bakın bunun gibi olacak menuleriniz
<div class="accordion">
<h3 class="toggler atStart">Item 1</h3>
<div class="element atStart">
Description 1
</div>
</div>
Bu kodlarin style.css'de oldugundan emin misin?

alp

#97
orada ufak bir hata olmuÅŸ
bu kısım style css de en başa eklenecek

/* Accordion Style Menu Block */
.toggler {
color: #222;
margin: 0;
padding: 2px 5px;
background: #eee;
border-bottom: 1px solid #ddd;
border-right: 1px solid #ddd;
border-top: 1px solid #f5f5f5;
border-left: 1px solid #f5f5f5;
font-size: 11px;
font-weight: normal;
font-family: 'Andale Mono', sans-serif;
}

.element {

}

.element p {
margin: 0;
padding: 4px;
}

.float-right {
padding:10px 20px;
float:right;
}

blockquote {
padding:5px 0 5px 30px;
}

/* END! Accordion Style Menu Block */


GladYatoR

Quote from: alp on November 28, 2007, 07:51:28 PM
   
md5 block

bu blok herhangi br kelime yada şifre ekliyorsunuz gönder butonuna tıkladığınızda , girmiş olduğunuz karakterleri md5 e çevirip geri veriyor olay bu ve md5 de tahmininiz üzere bir şifreleme olayı oluyor

php box oluştur içine kopyala
echo ' <center>';

$sifre = strip_tags($_POST['sifre']);
$sifrele = md5($sifre);

if (empty($sifre)) {
echo '
md5 e çevirmek istediğiniz karakterleri giriniz<br><br>
<form method="POST" action="">
<p><input type="text" name="sifre" size="56"><br>
<input type="submit" value="Gönder" name="submit"></p>
</form>';
}
else{
echo ' md5 e çevirmek istediğiniz sifreniz <b><font size="4" color="#FF0000">'.$sifre.'</font></b><br>';
echo '<br> md5 e çevilirmiş hali : <br><b><font size="4" color="#FF0000">'.$sifrele.'</font></b>';
echo '
<br><br>Tekrar Çevir <br>
<form method="POST" action="">
<p><input type="text" name="sifre" size="56"><br>
<input type="submit" value="Gönder" name="submit"></p>
</form>';
}


Alp yardımcı olmaya çalışıyorsun iyi hoÅŸ güzelde  bu kodu nereden aldığınıda yazsaydın
yada kodu yazanın ismini