not used in project

This commit is contained in:
Mike Macgirvin 2010-09-21 16:25:41 -07:00
parent db89a1eb44
commit 16bcbd8b21
4 changed files with 0 additions and 653 deletions

View File

@ -1,45 +0,0 @@
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:foaf="http://xmlns.com/foaf/0.1"
xml:base="http://www.example.org">
...
<author>
<name>James M Snell</name>
<foaf:homepage rdf:resource="/blog" />
<foaf:img rdf:resource="/mypic.png" />
</author>
<contributor>
<name>Jane Doe</name>
<foaf:homepage rdf:resource="/janesblog" />
<foaf:image rdf:resource="/janespic.png" />
</contributor>
...
</feed>
<feed xmlns="http://www.w3.org/2005/Atom"
xml:base="http://www.example.org/">
<id>http://www.example.org/pictures</id>
<title>My Picture Gallery</title>
<updated>2005-07-15T12:00:00Z</updated>
<author>
<name>James M Snell</name>
</author>
<entry>
<id>http://www.example.org/entries/1</id>
<title>Trip to San Francisco</title>
<link href="/entries/1" />
<updated>2005-07-15T12:00:00Z</updated>
<summary>A picture of my hotel room in San Francisco</summary>
<content type="image/png" src="/mypng1.png" />
</entry>
<entry>
<id>http://www.example.org/entries/2</id>
<title>My new car</title>
<link href="/entries/2" />
<updated>2005-07-15T12:00:00Z</updated>
<summary>A picture of my new car</summary>
<content type="image/png" src="/mypng2.png" />
</entry>
</feed>

View File

@ -1,440 +0,0 @@
<?php
$month = 0;
$year = 0;
$sort='';
$category='';
$category_id = 0;
$author = '';
$dest = '';
$rums = false;
$blgs = false;
$q = '';
$glbs = false;
$pagenum = 1;
$articles_page = 20;
$startrecord = 0;
$query_saved = substr($_SERVER['QUERY_STRING'],2); // strip '?=', save
$query_original = substr($query_saved,4); // strip 'atom'
$query_original = trim($query_original,'/');
ereg("[/]?page=([0-9]*)",$query_original,$va);
if(((count($va)) > 1) && ($va[1] > 0)) {
$pagenum = $va[1];
$query_original = ereg_replace("([/]?page=[0-9]*)","",$query_original);
$startrecord = ($pagenum * $articles_page) - $articles_page;
}
if(substr($query_original,-4,4) == 'text') {
$type = 'text';
$query_original = substr($query_original,0,-4);
}
$query_original = trim($query_original,'/');
if(substr($query_original,0,5) == 'forum') {
$rums = true;
$query_original = substr($query_original,5);
}
$query_original = trim($query_original,'/');
$cmd = explode('/',$query_original);
if($rums) {
if($cmd[0] == 'category') {
$category = $cmd[1];
}
else
$dest = $cmd[0];
}
else {
switch (count($cmd)) {
case 2:
if($cmd[0] == 'share') {
$share = $cmd[1];
break;
}
if(strlen($cmd[1])) {
$blgs = true;
$category = $cmd[1];
}
$author = $cmd[0];
break;
case 1:
if(strlen($cmd[0])) {
$blgs = true;
$author = $cmd[0];
}
break;
default:
break;
}
}
// build the return link
$href = $SITE_URL;
if($blgs)
$href .= preg_replace("@^atom@","/weblog",$query_saved);
else
$href .= preg_replace("@^atom@","",$query_saved);
$href = preg_replace("@/text$@","",$href);
$href = preg_replace("@/share/@","/view/",$href);
session_start();
session_write_close();
if((xint($SITE_RESTRICTED)) && (! xint($_SESSION['authenticated'])))
exit;
if($type == "text")
header("Content-type: text/plain");
else
header("Content-type: application/atom+xml");
echo '<?xml version="1.0" encoding="utf-8" ?>'."\r\n";
include("globs.php");
include("sql.php");
$sitesubs = get_default_subs();
// system defaults
$blog_url = $SITE_URL;
$blog_title = xmlificator($SITE_TITLE);
$blog_desc = xmlificator($BLOG_DESC);
$blog_author = xmlificator($BLOG_AUTHOR);
$blog_email = xmlificator($BLOG_EMAIL);
$blog_logo = $BLOG_LOGO;
if((strlen($blog_logo)) && (! strstr($blog_logo,"://")))
$blog_logo = $SITE_URL.'/'.$blog_logo;
$category = dbesc($category);
$author = dbesc($author);
$dest = dbesc($dest);
if(strlen($category) && (! ($category_id = category::get_cat_id($category,$author))))
$category = '';
if(strlen($author)) {
$author_info = get_author($author);
if(count($author_info)) {
$blog_url = xmlificator($SITE_URL.'/weblog/'.$author);
if(strlen($author_info[0]['blogname']))
$blog_title = xmlificator($author_info[0]['blogname']);
if(strlen($author_info[0]['blogdesc']))
$blog_desc = xmlificator($author_info[0]['blogdesc']);
if(strlen($author_info[0]['fullname']))
$blog_author = xmlificator($author_info[0]['fullname']);
if(strlen($author_info[0]['email']))
$blog_email = xmlificator($author_info[0]['email']);
if(strlen($author_info[0]['bloglogo'])) {
$blog_logo = xmlificator($author_info[0]['bloglogo']);
if((strlen($blog_logo)) && (! strstr($blog_logo,"://")))
$blog_logo = $SITE_URL.'/'.$blog_logo;
}
}
}
if(strlen($share)) {
$x = get_user($share);
if(count($x)
&& ($x[0]['share'])
&& (! $x[0]['lurker'])
&& (! $x[0]['sharecensor'])
&& (! $x[0]['sharemutual'])) {
if(xstr($x[0]['sitetitle']))
$blog_title = $x[0]['sitetitle'];
if(xstr($x[0]['sitedesc']))
$blog_desc = $x[0]['sitedesc'];
if(xstr($x[0]['sitelogo']))
$blog_logo = $x[0]['sitelogo'];
$newsubs = get_subs($x[0]['name']);
$groups = groupsinit();
unset($sitesubs);
$sitesubs = array();
foreach($newsubs as $sub) {
$p = fetch_permissions('forum',$sub);
if(check_access($_SESSION['username'], $groups, '',$p))
$sitesubs[] = $sub;
}
}
}
$media = getmediamap();
$build_date = gmdate('c');
$copyright = 'Copyright '.date('Y').' '.$blog_author;
$canonical = $SITE_URL;
if(substr($canonical,0,-1) != '/')
$canonical .= '/';
$self = $canonical;
if(substr($query_saved,0,1) == '/')
$self .= substr($query_saved,1);
else
$self .= $query_saved;
$subtitle = '';
if(strlen($blog_desc))
$subtitle = "<subtitle>$blog_desc</subtitle>";
echo <<< EOT
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:thr="http://purl.org/syndication/thread/1.0" >
<id>$canonical</id>
<title>$blog_title</title>
<link rel="alternate" href="$href" />
<updated>$build_date</updated>
$subtitle
EOT;
if(strlen($blog_logo)) {
echo <<< EOT
<logo>$blog_logo</logo>
EOT;
}
$article_id_list = array();
$ss = array();
$ss['tolerance'] = 0;
if($category_id)
$ss['category_id'] = $category_id;
if($blgs) {
$ss['type'] = 'weblog';
$ss['author'] = $author;
}
if($rums) {
$ss['type'] = 'forum';
$ss['forum'] = $dest;
}
$ss['countonly'] = true;
$rt = article_query($ss);
$totalarticles = $rt[0]['total'];
echo " <link rel=\"self\" href=\"$self\" />\r\n";
$self = ereg_replace("([/]?page=[0-9]*)","",$self);
if($totalarticles > $articles_page) {
if($pagenum != 1) {
$ppage = $pagenum - 1;
echo " <link rel=\"previous\" href=\"$self/page=$ppage\" />\r\n";
}
echo " <link rel=\"first\" href=\"$self/".'page=1'."\" />\r\n";
$numpages = $totalarticles / $articles_page;
$lastpage = (($numpages > intval($numpages))
? intval($numpages)+1
: $numpages);
echo " <link rel=\"last\" href=\"$self/page=$lastpage\" />\r\n";
if(($totalarticles - ($articles_page * $pagenum)) > 0) {
$npage = $pagenum + 1;
echo " <link rel=\"next\" href=\"$self/page=$npage\" />\r\n";
}
}
unset($ss['countonly']);
$ss['startat'] = $startrecord;
$ss['articles_page'] = $articles_page;
$r = article_query($ss);
if(count($r)) {
foreach($r as $rr) {
$article_id_list[] = "'".$rr['id']."'";
}
}
if(count($article_id_list)) {
$rcc = fetch_comments_by_list($article_id_list,'article');
$ratt = fetch_attachments_by_list($article_id_list);
}
foreach($r as $rr) {
$link = "{$SITE_URL}/article/{$rr['guid']}";
$datestr = $rr['created'];
$pubdate = gmdate('c',strtotime($datestr.' +0000'));
$datestr = $rr['edited'];
$editdate = gmdate('c',strtotime($datestr.' +0000'));
if(strstr($rr['type'],'news')) {
if(strlen($rr['ext_author']))
$authorstr = "<author><name>{$rr['ext_author']}</name></author>\r\n";
else
$authorstr = "<author><name>External Author</name></author>\r\n";
}
else {
if(strlen($rr['fullname']))
$authorstr = "<author><name>{$rr['fullname']}</name></author>\r\n";
else
$authorstr = "<author><name>{$rr['author']}</name></author>\r\n";
}
$guid = "urn:uuid:{$rr[guid]}";
$comments = "{$SITE_URL}/comments/{$rr['guid']}";
$contents = $rr['body'];
if((! $rr['approved']) && (! strstr($rr['type'], 'news')))
$contents = filter_images($contents);
$contents = macro_youtube($contents);
$contents = reltoabs($contents,$SITE_URL.'/');
$title = xmlificator($rr['title']);
if(! strlen($title)) {
$title = xmlificator(substr($datestr,0,11));
// Use the first 28 chars of text for the title-summary. Watch that
// we don't end up with a _partial_ escape sequence at the end.
$stripped = xmlificator(strip_tags($contents));
$len = 28;
$ok = 0;
while(! $ok) {
$summary=substr($stripped,0,$len);
if(($teststr = strrchr($summary,"&")) && (! strchr($teststr,";"))) {
$len --;
}
else {
$ok = 1;
break;
}
}
// Chopped off words don't look pretty in an RSS title
if(strrpos($summary,' ') > 10)
$title .= ' '.substr($summary,0,(strrpos($summary,' ')));
}
$contents .= feed_attachments($ratt,$rr['id']);
$contents .= feed_comments($rcc,$rr['id'],$rr['guid'],$rr['rank']);
$contents = reltoabs($contents,$SITE_URL.'/');
$contents = xmlificator($contents);
// output the item
echo <<< EOT
<entry>
<id>$guid</id>
<title type="html">$title</title>
<published>$pubdate</published>
<updated>$editdate</updated>
<link rel="alternate" href="$link" />
<content type="html">$contents</content>
$authorstr
EOT;
$rc = category::categories_by_article($rr['id']);
if(count($rc))
for($x = 0; $x < count($rc); $x ++)
echo ' <category term="'.xmlificator($rc[$x]).'"/>'."\r\n";
$rat = attachments_fetch($rr['id']);
if(count($rat)) {
foreach($rat as $att) {
$filename = $att['filename'];
$ext = substr($filename,strrpos($filename,'.'));
$type = 'application/octet-stream';
foreach($media as $m) {
if($m[0] != $ext)
continue;
$type = $m[2];
break;
}
echo ' <link rel="enclosure" href="'.$SITE_URL.'/'.xmlificator($filename).'" length="'.$att['size'].'" type="'.$type.'" />'."\r\n";
}
}
echo "</entry>\r\n\r\n";
// if(($ALLOW_COMMENTS == "1") && (count($rcc))) {
// foreach($rcc as $c) {
// if($c['tid'] != $rr['id'])
// continue;
// $cguid = "urn:uuid:{$c['guid']}";
// $datestr = $c['created'];
// $cpubdate = date(c,strtotime($datestr));
//
// $ccontents = format_avatar($c['avatar'],$c['author'],$c['userid'],
// $c['censored'],0,'',64).'<br />';
// $ccontents .= $c['body'];
//
// $ccontents = filter_images($ccontents);
// $ccontents = reltoabs($ccontents,$SITE_URL.'/');
// $ccontents = xmlificator($ccontents);
// if(strlen($c['fullname']))
// $cauthor = xmlificator($c['fullname']);
// else
// $cauthor = xmlificator($c['author']);
// $cauthorstr = '<author><name>'.$cauthor.'</name>';
// if(strlen($c['url']))
// $cauthorstr .= '<uri>'.xmlificator($c['url']).'</uri>';
// $cauthorstr .= '</author>';
//
//echo <<< EOT
//<entry>
//<thr:in-reply-to ref="$guid" />
//<id>$cguid</id>
//<title type="html">Re: $title</title>
//<link rel="related" href="$link" />
//<published>$cpubdate</published>
//<updated>$cpubdate</updated>
//<content type="html">$ccontents</content>
//$cauthorstr
//</entry>
//
//EOT;
//}
//}
}
echo "</feed>\r\n";
?>

View File

@ -1,159 +0,0 @@
http://docs.simplemachines.org/index.php?topic=57.0
Button Usage Description
[b]text[/b] Makes text bold.
[i]text[/i] Makes text italicized.
[u]text[/u] Underlines text.
[s]text[/s] Strikes out text.
[glow=red,2,50]glow[/glow] Adds a glowing effect to text. This BBCode only works with MS Internet Explorer. This is not a standard feature in any other browser.
[shadow=red,left]shadow[/shadow] Adds a shadow effect to text. This BBCode only works with MS Internet Explorer. This is not a standard feature in any other browser.
[move]text[/move] Makes the text inside move in a marquee.
[pre]text[/pre] Preformats enclosed text.
[left]left align[/left] Aligns enclosed items to the left.
[center]centered[/center] Aligns enclosed items to the center.
[right]right align[/right] Aligns enclosed items to the right.
[hr] Inserts a horizontal rule into a Post or PM. Note there is no closing tag.
[size=10pt]font size[/size] Adjusts the font size of the enclosed text.
[font=Verdana]font face[/font] Used to change the font face of the enclosed text.
[flash=200,200]http://somesite/somefile.swf[/flash] Inserts a link to an animated flash file in .swf format. Please be cautious when enabling this BBCode in your forum, since it may be a security risk.
[img]http://somesite/image.jpg[/img] Inserts an image into a Post or personal message.
[url]http://somesite/[/url]
or [url=http://somesite/]Site Name[/url] Formats a URL in a Post or personal message.
[email]someone@somesite[/email]
or [email=someone@somesite]Somename[/email] Formats an email address in a Post or personal message.
[ftp]ftp://somesite[/ftp]
or [ftp=ftp://somesite]somesite[/ftp] Formats an FTP address in a Post or personal message.
[sup]text[/sup] Formats enclosed text as a superscript.
[sub]text[/sub] Formats enclosed text as a subscript.
[tt]text[/tt] Formats enclosed text in teletype format.
[code]code[/code] Used to insert a selection of code into a Personal message or post.
[quote]text[/quote] or
[quote=Author link=http://somesite/]text[/quote] Places enclosed text in a quote box.
[list]
[li]SMF[/li]
[li]YaBB SE[/li]
[/list]
You can also use the following:
[list]
[o]circle
[O]circle
[0]circle
[*]disc
[@]disc
[+]square
[x]square
[#]square
[/list] Inserts items in list format.
For the following 3 tags: they have to be used exactly like their HTML equivalent.This is a table.
[table][/table] Inserts a table. It can't be used alone, or it has no sense!
[tr][/tr] Inserts a row into a table. This BBCode can't be used alone.
[td][/td] Inserts a column into a table. This BBCode can't be used alone.
BBCode without buttons on the interface.
Usage Description
[abbr=exemlpi gratia]eg[/abbr] Displays the full expression for the abbreviation on mouseover.
[acronym=Simple Machines Forum]SMF[/acronym] Displays the full expression for the acronym on mouseover.
[html]<br />[/html] Parses HTML code. (Only Admins can use this)
[nobbc] [/nobbc] Ignores bbcode formatting
[time]1132812640[/time] Converts a Unix Timestamp into a time recognizable by people.
[iurl]http://somesite/[/iurl] Makes a link that opens in the same window.
[anchor=test]Test[/anchor] [url=#test]Link to anchor[/url]
act me.
Introduction
This free tool allows you to easily convert BBCode formatted text (such as forum posts) to standard HTML. Unlike some converters, this will generate proper paragraph tags (instead of just using a lot of line breaks), and it utilizes CSS declarations for font sizes, color, etc. instead of their depreciated HTML tag counterparts. There are several options available, and a list of supported tags can be found below.
Enter BBCode to convert to HTML
Conversion Options
Use filenames for image alt text
Close tags properly for XHTML
Links open in new window (target="_blank")
Ignore color declarations
Ignore font type and size declarations
Protect email addresses (userATdomainDOTcom)
Supported BBCode Tags
*
Bold
[b]Hello[/b]
*
Underlined
[u]Hello[/u]
*
Italics
[i]Hello[/i]
*
Strikethrough
[s]Hello[/s]
*
Forced Linebreak
[br]
*
Colors
[color=red]Hello[/color]
*
[color=#FF0000]Hello[/color]
*
Font Size
[size=9]Hello[/size]
*
Font Type
[font=Verdana]Hello[/font]
*
Alignment
[align=left]left aligned text[/align]
*
[align=center]centered text[/align]
*
[center]centered text[/center]
*
[align=right]right aligned text[/align]
*
Quotes
[quote]Hello[/quote]
*
[quote="Name"]Hello[/quote]
*
[quote=Name]Hello[/quote]
*
Code
[code]Hello[/code] (text between code tags is not modified)
*
Unordered Lists
[list] [*]Red [*]Blue [*]Yellow [/list]
*
Ordered Lists
[list=1] [*]Red [*]Blue [*]Yellow [/list]
*
[list=a] [*]Red [*]Blue [*]Yellow [/list]
*
Links
[url]http://www.example.com/[/url]
*
[url=http://www.example.com/]Example[/url]
*
Email
[email]user@domain.com[/email]
*
[email=user@domain.com]email me[/email]
*
Images
[img]http://domain.com/image.jpg[/img]

View File

@ -1,9 +0,0 @@
You could use proc_open for this:
proc_close(proc_open ("./script.php &", array(), $foo));
The empty array for the output specs prevents opening any pipes to the new
process, so proc_open doesn't wait for the execution of script.php to
finish - the last parameter is just there because it has to be.
proc_close() closes the process immediately, so your PHP script doesn't
stop.