Hello!
I looked all mods for 7.01.05 and I couldn't find what I was looking for. In fact I need something very very simple:
I need a pannel that could be called: invitation pannel. (A list box panel)
It would be like a shoutbox but each member could write their name in a box in a maximum of 25 characters(1line)and submit it. I want that a member is NOT allowed to send more than a line of max 25 characters but once it is sent I want they could modify it or delete it. Then the word submited would appear just above the text box in a list on which everyone could add his name too.
I've almost found what I was looking for: the personnal favourite panel. But!
It need to be modified: the test inserted is not viewable by everyone, each member only see his own favourite link inserted, I want that the addition of all texts submited by each member appear as a list viewable by everyone. I also want to remove the preselected text inserted in the box,
Here is the invitation_panel.php:
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: personal_favorites_panel.php
| CVS Version: 3.0
| Author: Ronald Iwema
| Converted for V7 by HobbyMan
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION"Wink) { die("Access Denied"Wink; }
include INFUSIONS."personal_favourites_panel/infusion_db.php";
if (file_exists(INFUSIONS."personal_favourites_panel/locale/".$settings['locale'].".php"Wink) {
include INFUSIONS."personal_favourites_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."personal_favourites_panel/locale/English.php";
}
if (isset($_POST['addlink']) && !empty($_POST['addlink']))
{
$new_link = addslashes($_POST['fav_link']);
$new_title = trim(addslashes($_POST['fav_title']));
$new_user_id = $userdata['user_id'];
$new_link_hash = md5($_POST['fav_link']);
$q = "REPLACE INTO ".DB_FAVORITES." (fav_user_id,fav_link,fav_title, fav_link_hash) VALUES ($new_user_id,'$new_link','$new_title', '$new_link_hash'Wink";
if (!empty($new_title))
$r = @dbquery($q);
}
openside($locale['fav001']);
if (iMEMBER) {
$q = "SELECT * FROM ".DB_FAVORITES." WHERE fav_user_id = ".$userdata['user_id']." ORDER BY fav_title ASC";
$r = dbquery($q);
if ($r && mysql_num_rows($r) > 0){
while ($obj = mysql_fetch_object($r))
{
echo "<img src='".THEME."images/bullet.gif'> <a href='".$obj->fav_link."' class='side'>".htmlspecialchars($obj->fav_title)."</a><br />";
}
}
echo "<hr>n";
$s1 = $_SERVER['PHP_SELF'];
$s2 = $_SERVER['QUERY_STRING'];
$clink = $s1 . (empty($s2) ? "" : "?"Wink . $s2;
if (isset($_GET['readmore']) && isset($news_subject))
$ptitle = FAV_011.": " . $news_subject;
elseif (isset($cat_id) && isNum($cat_id) && strpos($_SERVER['PHP_SELF'], 'articles'Wink > 1)
if ($data = dbarray(dbquery("SELECT article_cat_id, article_cat_name FROM ".DB_ARTICLE_CATS." WHERE article_cat_id='$cat_id'"Wink))
$ptitle = $locale['fav012'].": ".$data['article_cat_name'];
else $ptitle = substr($clink, strrpos($clink, '/'Wink+1);
elseif (isset($article_subject) && !empty($article_subject))
$ptitle = $locale['fav013'].": ".$article_subject;
elseif (isset($cat_id) && isNum($cat_id) && strpos($_SERVER['PHP_SELF'], 'downloads'Wink > 1)
if ($data = dbarray(dbquery("SELECT download_cat_name FROM ".DB_DOWNLOAD_CATS." WHERE download_cat_id='$cat_id'"Wink))
$ptitle = $locale['fav018'].": ".$data['download_cat_name'];
else $ptitle = substr($clink, strrpos($clink, '/'Wink+1);
elseif (isset($cat_id) && isNum($cat_id) && strpos($_SERVER['PHP_SELF'], 'faq.php'Wink > 1)
if ($data = dbarray(dbquery("SELECT faq_cat_name FROM ".DB_FAQ_CATS." WHERE faq_cat_id='$cat_id'"Wink))
$ptitle = $locale['fav019'].": ".$data['faq_cat_name'];
else $ptitle = substr($clink, strrpos($clink, '/'Wink+1);
elseif (isset($forum_id) && !empty($forum_id) && strpos($_SERVER['PHP_SELF'], 'viewforum.php'Wink > 1)
$ptitle = $locale['fav017'].": ".substr($caption, strrpos($caption, '|'Wink+2);
elseif (isset($forum_id) && !empty($forum_id) && strpos($_SERVER['PHP_SELF'], 'viewthread.php'Wink > 1)
$ptitle = $locale['fav016'].": ".$tdata['thread_subject'];
elseif (isset($forum_id) && !empty($forum_id) && strpos($_SERVER['PHP_SELF'], 'viewthread.php'Wink > 1)
$ptitle = $locale['fav016'].": ".$tdata['thread_subject'];
elseif (isset($cat_id) && isNum($cat_id) && strpos($_SERVER['PHP_SELF'], 'weblinks.php'Wink > 1)
if ($data = dbarray(dbquery("SELECT weblink_cat_name FROM ".DB_WEBLINK_CATS." WHERE weblink_cat_id='$cat_id'"Wink))
$ptitle = $locale['fav014'].": ".$data['weblink_cat_name'];
else $ptitle = substr($clink, strrpos($clink, '/'Wink+1);
elseif (strpos($_SERVER['PHP_SELF'], 'submit.php'Wink > 0 && $_SERVER['QUERY_STRING']=='stype=l'Wink
$ptitle = $locale['fav022'];
elseif (strpos($_SERVER['PHP_SELF'], 'submit.php'Wink > 0 && $_SERVER['QUERY_STRING']=='stype=a'Wink
$ptitle = $locale['fav021'];
elseif (strpos($_SERVER['PHP_SELF'], 'submit.php'Wink > 0 && $_SERVER['QUERY_STRING']=='stype=n'Wink
$ptitle = $locale['fav020'];
elseif (strpos($_SERVER['PHP_SELF'], 'submit.php'Wink > 0 && $_SERVER['QUERY_STRING']=='stype=p'Wink
$ptitle = $locale['fav023'];
else
$ptitle = ucwords(substr($clink, strrpos($s1, '/'Wink+1, -4));
echo "<form action='".$clink."' method='post' name='favform'><center>";
echo "<input type='hidden' name='fav_link' value='$clink'>n";
echo "<input type='text' name='fav_title' value='".$ptitle."' class='textbox' style='width:140px;'><br />n";
echo "<input type='submit' name='addlink' value='".$locale['fav006']."' class='button'>n";
echo "</center></form>n";
echo "<hr /><center>";
echo "<span class='small'><a href='".INFUSIONS."personal_favourites_panel/personal_favourites_manage.php' class='side'>".$locale['fav007']."</a></span>";
echo "</center>";
} else { echo $locale['fav026']; }
closeside();
?>
There are many lines to delete and some to add. I just need a text box with a list above.
It's very easy to do but know nothing about coding.
Please help
thanks!
the mod in attachment.
garys02 attached the following file: 0 replies