Omnimaga

Omnimaga => Site Feedback and Questions => Topic started by: calcdude84se on May 15, 2011, 01:30:52 pm

Title: Random Topic Button
Post by: calcdude84se on May 15, 2011, 01:30:52 pm
I doubt this will ever get implemented, but just a random feature request that came to me: could there be a button that takes one to a random unread topic?
I'm only asking because I think it would make browsing new posts more interesting ;D
Title: Re: Random Topic Button
Post by: ruler501 on May 15, 2011, 03:00:12 pm
That sounds good but complicated to make.
Title: Re: Random Topic Button
Post by: Darl181 on May 15, 2011, 03:54:31 pm
Well, all it would have to do would be make an omniurl.tk with a random number after it, up to however many topics there are, then check if a) the person's permitted to read it (staff section, etc.) and b) if it's unread.
Then it would somehow get the message number, and bam.
Title: Re: Random Topic Button
Post by: DJ Omnimaga on May 15, 2011, 06:16:09 pm
I fear this would only increase necroposting... :/
Title: Re: Random Topic Button
Post by: calcdude84se on May 15, 2011, 06:59:51 pm
Okay then, random unread topic that's less than 2 weeks old :P
Title: Re: Random Topic Button
Post by: ruler501 on May 15, 2011, 07:04:17 pm
It sounds like a good idea. It would just be very hard to implement. You'd have to check when the last post was if the user had read it and find a random thread to do that in.
Title: Re: Random Topic Button
Post by: DJ Omnimaga on May 15, 2011, 07:35:48 pm
Yeah it would be hard. D:
Title: Re: Random Topic Button
Post by: Deep Toaster on May 15, 2011, 07:38:31 pm
It'd actually be pretty simple if we had an RSS feed for the newest posts.
Title: Re: Random Topic Button
Post by: z80man on May 15, 2011, 07:44:54 pm
It should also check to see if a topic is locked or not too. But I would think that it should allow different sections to be randomized in because I might not want to see a random topic in the pixel art sub forum for example
Title: Re: Random Topic Button
Post by: DJ Omnimaga on May 17, 2011, 11:45:29 pm
Yeah true. I myself, for example, do not pay much attention to many hardware or math threads.

Also, if that was added, it would take someone to code it too :P
Title: Re: Random Topic Button
Post by: Jonius7 on May 17, 2011, 11:47:44 pm
It'd actually be pretty simple if we had an RSS feed for the newest posts.
I thought omnimaga has an rss feed of sorts, i can view new posts through opera mail.
The random topic button is a good one but not good for randomising the whole forum. There must be some system of segmenting which topics to randomise and which to not.

EDIT:???
Title: Re: Random Topic Button
Post by: Jonius7 on May 18, 2011, 05:40:38 am
So here's a screenshot of the rss from omnimaga working in action:
Might be useful

To activate this in opera there should be a rss icon at the very right of the address bar when you're on the omnimaga page.
Title: Re: Random Topic Button
Post by: Deep Toaster on May 18, 2011, 09:33:32 am
Hmm, can you find the address? If we have an RSS feed getting a random new post would be too easy.
Title: Re: Random Topic Button
Post by: Jonius7 on May 18, 2011, 08:31:14 pm
Yes i found it!
http://www.omnimaga.org/index.php?PHPSESSID=ad96e8b528beaf626b653a225157688f&type=rss;action=.xml
works in firefox too but opera has the handy button in the address bar
Title: Re: Random Topic Button
Post by: Deep Toaster on May 18, 2011, 10:10:12 pm
Thanks, and done!

http://clrhome.co.cc/b/omninew/

Feel free to steal the script:

Quote from: PHP
$feed = new DOMDocument();
$feed->load('http://www.omnimaga.org/index.php?action=.xml;type=rss2');
header('Location: ' . $feed->getElementsByTagName('guid')->item(rand(0,4))->nodeValue);

The problem is that http://www.omnimaga.org/index.php?action=.xml;type=rss only shows the last five posts (so any "random post" is within the last five, which isn't really random). Anybody find a longer version?

EDIT: Update here (http://ourl.ca/11024/210159)
Title: Re: Random Topic Button
Post by: ruler501 on May 18, 2011, 10:11:27 pm
this is only going to the random topic page(the last one posted in). I'll try it later after someones posted in a different topic and see if it still does the same thing.
EDIT:nvm It just was chance it went to the same one twice the third time it went somewhere else.
Title: Re: Random Topic Button
Post by: Deep Toaster on May 18, 2011, 10:18:15 pm
Hello hello, figured it out!

It now goes to one of the last 100 topics posted in.

http://clrhome.co.cc/b/omninew/

Again, feel free to use this:

Quote from: PHP
$feed = new DOMDocument();
$feed->load('http://www.omnimaga.org/index.php?action=.xml;type=rss2;limit=100');
header('Location: ' . $feed->getElementsByTagName('guid')->item(rand(0,99))->nodeValue);

EDIT: Update here (http://ourl.ca/11024/214191)
Title: Re: Random Topic Button
Post by: ruler501 on May 18, 2011, 10:19:04 pm
can you make it so it checks if that last post was by the user because I don't really wan to go to a topic I was the last to post in
Title: Re: Random Topic Button
Post by: Deep Toaster on May 18, 2011, 10:24:34 pm
Picky, picky <_< J/k.

Maybe later. Author isn't stored in the RSS feed, so I'd have to find a way to get the author name by actually making the script parse the topic page.
Title: Re: Random Topic Button
Post by: ruler501 on May 18, 2011, 10:53:31 pm
Are you able to get the username of who's going to the page(the user)?
Couldn't you try the parse the new posts page for that? I think that might be easier
Title: Re: Random Topic Button
Post by: Deep Toaster on May 19, 2011, 11:24:53 am
It's the difference between this:

Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xml:lang="en-US">
<channel>
<title>Omnimaga: The Coders Of Tomorrow</title>
<link>http://www.omnimaga.org/index.php</link>
<description><![CDATA[Live information from Omnimaga: The Coders Of Tomorrow]]></description>
<item>
<title><![CDATA[Re: David's Z80 Assembly Questions]]></title>
<link>http://ourl.ca/10972/210254</link>
<description>
<![CDATA[That's actually a very good idea. I tried it but it's not working:<br /><br />[code]]>]<![CDATA[.nolist<br />#include &quot;ti83plus.inc&quot;<br />#include &quot;dcs7.inc&quot;<br />.list<br />&nbsp; &nbsp;.org userMem-2<br />&nbsp; &nbsp;.db $BB,$6D<br />Init:<br />&nbsp; B_CALL (_ClrLCDFull)<br />&nbsp; ld hl,0<br />&nbsp;<br />Loop:<br />&nbsp;<br />&nbsp; ld b,8<br />&nbsp; ld ix,MyImage<br />&nbsp; ld a,h<br />&nbsp; pus...]]>
</description>
<category><![CDATA[ASM Language]]></category>
<comments>http://www.omnimaga.org/index.php?action=post;topic=8375.0</comments>
<pubDate>Thu, 19 May 2011 15:15:50 GMT</pubDate>
<guid>http://ourl.ca/10972/210254</guid>
</item>
<item>
<title><![CDATA[Re: David's Z80 Assembly Questions]]></title>
<link>http://ourl.ca/10972/210253</link>
<description><![CDATA[You're destroying the outputs of iGetPixel when you <tt>pop hl</tt> and <tt>pop af</tt>. Note that simply moving <tt>and (hl)</tt> before these pops won't help, because <tt>pop af</tt> changes the flags register. What does A hold, anyway?]]></description>
<category><![CDATA[ASM Language]]></category>
<comments>http://www.omnimaga.org/index.php?action=post;topic=8375.0</comments>
<pubDate>Thu, 19 May 2011 15:15:26 GMT</pubDate>
<guid>http://ourl.ca/10972/210253</guid>
</item>
<item>
<title><![CDATA[Re: David's Z80 Assembly Questions]]></title>
<link>http://ourl.ca/10972/210252</link>
<description>
<![CDATA[POP HL \ POP AF now destroys the values returned by iGetPixel.<br /><br />How about this: Use POP DE to put the value that was originally in HL (the X and Y coordinates) into DE. Then INC E instead of L in your SetGravity code. At the end of the routine, load DE ...]]>
</description>
<category><![CDATA[ASM Language]]></category>
<comments>http://www.omnimaga.org/index.php?action=post;topic=8375.0</comments>
<pubDate>Thu, 19 May 2011 15:12:40 GMT</pubDate>
<guid>http://ourl.ca/10972/210252</guid>
</item>
<item>
<title><![CDATA[Re: Axe Parser]]></title>
<link>http://ourl.ca/4050/210251</link>
<description><![CDATA[<div class="quoteheader"><a href="http://ourl.ca/11030/69620">Quote from: DJ_O on Wed 31 Dec, 1969, 19:00:00</a></div><div class="quote"><b><span style="color: red;">2: ASM code must not compose more than 10% of your program code and the only allowed way to use assembly is via the Asm() command. The remaining 90% must be Axe or Axiom code. (See previo...</span></b></div>]]></description>
<category><![CDATA[The Axe Parser Project]]></category>
<comments>http://www.omnimaga.org/index.php?action=post;topic=1453.0</comments>
<pubDate>Thu, 19 May 2011 15:09:07 GMT</pubDate>
<guid>http://ourl.ca/4050/210251</guid>
</item>
<item>
<title><![CDATA[Re: David's Z80 Assembly Questions]]></title>
<link>http://ourl.ca/10972/210250</link>
<description><![CDATA[<div class="quoteheader"><a href="http://ourl.ca/10972/210248">Quote from: Deep Thought on <b>Today</b> at 11:02:09</a></div><div class="quote">Np, and another thing: Don't be afraid to use gotos (JP/JR) in ASM. You could save a couple of bytes and some clock cycles by putting your MoveUp/MoveDown/MoveLeft/MoveRigh...</div>]]></description>
<category><![CDATA[ASM Language]]></category>
<comments>http://www.omnimaga.org/index.php?action=post;topic=8375.0</comments>
<pubDate>Thu, 19 May 2011 15:04:28 GMT</pubDate>
<guid>http://ourl.ca/10972/210250</guid>
</item>
</channel>
</rss>

And this:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>   <script type="text/javascript">ginf={url:'http://szas.info',script:'go.php',target:{h:'http://www.omnimaga.org',p:'/',b:''},enc:{u:'a8d917fe12186cc4cf',e:'1',p:''},b:'3'}</script>
   <script type="text/javascript" src="http://szas.info/inc/main.js"></script>
<meta name=%2526quot%253Bgoogle-site-verification%2526quot%253B content="ztcR_ZEXO8rEV6ZhFBtUwdVULWiy_l3KYFaiqMtajxU" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name=%2526quot%253Bdescription%2526quot%253B content="Latest Activity" />
<meta name=%2526quot%253Bkeywords%2526quot%253B content="Omnimaga: The Coders Of Tomorrow, Omnimaga, The Coders Of Tomorrow, download, projects, TI-73, TI-82, TI-83, TI-84, TI-85, TI-86, TI-89, TI-92, Voyage 200, TI-Nspire, calculator, calc, RPG, action, adventure, game, metroid, reuben, quest, zelda, final fantasy, reign of legends, Illusiat, mario, music, techno, trance, eurodance, hardcore, rave, club, nitacku, dj, bfr, un posse, netham45, anime, key factoring, hacking, cracking, game boy, color, game boy color, GB, GBC, emulator, TI-Boy SE, TI-Boy, gbc4nspire" />



<link rel="stylesheet" type="text/css" href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY2MaoUylYaOzMw9mqzRkZD%3D%3D&amp;b=3" />
<link rel="stylesheet" type="text/css" href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLipKWmozu5Ml9wMKMuMl5jMzL%2Fp3MuZGR%3D&amp;b=3" media="print" />
<link rel="help" href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKIlrJZ%3D&amp;b=3" target="_blank" />
<link rel="search" href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJMlozIjqD%3D%3D&amp;b=3" />
<link rel="contents" href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%3D&amp;b=3" />
<link rel="alternate" type="application/rss+xml" title="Omnimaga: The Coders Of Tomorrow - RSS" href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2kwpw1yMzL7oaOaqzWuCF5erax%3D&amp;b=3" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />





</head>
<body>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-7540624-37']);
  _gaq.push(['_setDomainName', 'none']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!-- Begin Publisher Code for historyhelp.net -->
<script type="text/javascript" language="javascript">
adlsi9 = "19285e5475fc48823ae1538eaf0311ca79|97179|972"
</script>
<script src="http://www.adversalservers.com/publisherJS.js"></script>
<script type="text/javascript" language="javascript">
goAdversal("19285e5475fc48823ae1538eaf0311ca", 1, 4);
</script>
<!-- End Publisher Code for historyhelp.net -->
<script type="text/javascript" src="click.js"></script>

<div style="padding:5px;"></div>

<center>



  <table width="984" border="0">
    <tr>
      <td width="728"><!-- BEGIN STANDARD TAG - 728 x 90/468 x 60 - ROS: Run of site: default description - DO NOT MODIFY -->
<iframe frameborder=0 marginwidth=0 marginheight=0 scrolling=NO width=728 height=90 src="http://ads.loadcontent.net/hit.php"></iframe>
<!-- END TAG --></td>
      <td width="256">
      
<table width="256" height="90" border="0">
  <tr valign="top">
    <td><div style="padding-left:5px;font:13px Verdana,Arial,Tahoma;color:#000;">

Like our <a href="http://facebook.com/Unbanner" target="_blank">Facebook page</a> or follow us on <a href="http://twitter.com/Unbanner" target="_blank">Twitter</a> for the latest updates.


</div></td>
  </tr>
  <tr valign="bottom">
    <td><div style="padding-left:5px;font:13px Verdana,Arial,Tahoma;color:#000;">
    Enter your email address for the latest sites in your inbox.
    </div></td>
  </tr>
</table>

      
      </td>
    </tr>
    <tr>
      <td><table width="728" border="0">
        <tr>
          <td><div style="padding:8px;font:12px Verdana,Arial,Tahoma;color:#000;">

     <form action="http://szas.info/inc/request.php?action=update" method="post">
 <div>
  <select name=%2526quot%253Ba%2526quot%253B
    <option>Quick browse links</option>
    <option value="facebook.com">Facebook</option>
    <option value="youtube.com">YouTube</option>
    <option value="myspace.com">MySpace</option>
    <option value="twitter.com">Twitter</option>
    <option value="m.twitter.com">m.Twitter</option>
    <option value="bebo.com">Bebo</option>
    <option value="google.com">Google</option>
    <option value="ebuddy.com">eBuddy</option>
    
  </select>
</div>

</form>
</div></td>
          <td> <div style="padding:5px;font:12px Verdana,Arial,Tahoma;color:#000;">  
    <form action="http://szas.info/inc/request.php?action=update" method="post" style="padding:0;margin:0;" name=%2526quot%253Ba%2526quot%253B%2526gt%253B
      <input type="text" name=%2526quot%253Ba%2526quot%253B size="50" value="http://www.omnimaga.org/index.php?action=ezportal;sa=page;p=5" style="width:500px;border: 1px solid #447900;">
 <input type="submit" value="Go!">



</form>
    </div></td>
        </tr>
      </table></td>
      <td>      <table>
  <tr><td>
  <form action="http://groups.google.com/group/unbanner/boxsubscribe">
  <tr><td>
  <input type=text name=email style="width:165px;"  'Your email address here');"  'Your email address here');" value="Your email address here">
  <input type=submit name=%2526quot%253Bsub%2526quot%253B value="Mail me!">
  </td></tr>
</form>
</table>
      
 
      
      </td>
    </tr>
  </table>
  
</center>

<!--[glype:proxified_within_form]-->

<!--[glype:proxified_below_form]-->

<center>
</center>
<div class="tborder" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg5" height="32">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%3D&amp;b=3"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiLacuqachqT40Y3M6oaElMv9vrzS2rJW0Lv50qaZ%3D&amp;b=3" style="margin: 0px;" alt="Omnimaga: The Coders Of Tomorrow" /></a>
</td>

</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td class="titlebg2" height="32">
<span style="font-size: 100%;"> Hello <b>Deep Thought</b></span>
</td>
<td class="titlebg2" align="right" nowrap="nowrap" valign="middle">
<form action="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJMlozIjqGV%3D&b=3" method="post" accept-charset="ISO-8859-1" style="margin: 0;">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJMlozIjqGghpJyhLKOlpD%3D%3D&amp;b=3"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9mqayapzHhqUMm&amp;b=3" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name=%2526quot%253Bsearch%2526quot%253B value="" style="width: 190px;" />
<input type="submit" name=%2526quot%253Bsubmit%2526quot%253B value="Search" style="width: 11ex;" />
<input type="hidden" name=%2526quot%253Badvanced%2526quot%253B value="0" />
</form>
</td>
</tr>
</table>
</div>
<div class="tborder1" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg5" height="32">
<img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiLacuqachqT40Y3M6oaElMv9vrzS2rJW0Lv50qaZ%3D&amp;b=3" style="margin: 0px;" alt="Omnimaga: The Coders Of Tomorrow" />
</td>

</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td class="titlebg2" height="32">
<span style="font-size: 100%;"> Hello <b>Deep Thought</b></span>
</td>
<td class="titlebg2" height="32" align="right">
<span class="smalltext">05/19/11, 08:17:37</span>
<a href="" ><img id="upshrink" src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9bL2M1MKMurP50qaZ%3D&amp;b=3" alt="*" title="Shrink or expand the header." align="bottom" style="margin: 0 1ex;" /></a>
</td>
</tr>
<tr id="upshrinkHeader">
<td valign="top" colspan="2">
<table width="100%" class="bordercolor" cellpadding="8" cellspacing="1" border="0" style="margin-top: 1px;">
<tr>
<td colspan="2" width="100%" valign="top" class="windowbg2"><span class="middletext">
<br /><span style="font-size: 85%;"><a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJuuMKWhpD%3D%3D&amp;b=3">Show unread posts since last visit.</a> <br />
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJuuMKWhpJIlL3y2pzL%3D&amp;b=3">Show new replies to your posts.</a></span>
Total time logged in: 32 days, 13 hours and 9 minutes.<br /> </span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table id="upshrinkHeader2" width="100%"

cellpadding="4" cellspacing="0" border="0">
<tr>
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJMlozIjqGV%3D&b=3" method="post" accept-charset="ISO-8859-1"

style="margin: 0;">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJMlozIjqGghpJyhLKOlpD%3D%3D&amp;b=3"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9mqayapzHhqUMm&amp;b=3"

align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name=%2526quot%253Bsearch%2526quot%253B value="" style="width: 190px;" />
<input type="submit" name=%2526quot%253Bsubmit%2526quot%253B value="Search" style="width: 11ex;" />
<input type="hidden" name=%2526quot%253Badvanced%2526quot%253B value="0" />
</form>
</td>
</tr>
</table>
</div>
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 0px;">
<tr>
<td class="maintab_first"> </td><td class="maintab_active_first"> </td>
<td valign="top" class="maintab_active_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%3D&amp;b=3">home</a>
</td><td class="maintab_active_last"> </td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2Fo2WhMKR9ZGRhZN%3D%3D&amp;b=3">news</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKSvnzS5Lz5kMt%3D%3D&amp;b=3">downloads</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKWgL2WyM255B2MhCJAhqUV7Lm00&amp;b=3">projects</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKWgL2WyM255B2MhCJAhqUV7Lm03&amp;b=3">misc</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKAvMJu6&amp;b=3">forums</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKWgL2WyM255B2MhCJAhqUV7Lm0l&amp;b=3">rules</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJ5kraMu&amp;b=3">admin</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV%3D&amp;b=3">profile</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKWgL2WyM255B2MhCJAhqUV7Lm01&amp;b=3">new posts</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJA6&amp;b=3">inbox </a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKWgL2WyM255B2MhCJAhqUV7Lm0kAj%3D%3D&amp;b=3">about</a>
</td>
<td valign="top" class="maintab_back">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCKyvqTWbMmgzpzMjCGV0AwVlpQMhZQp2BGOipwx5ZKNkpGEiZGD1pGp4o3Wl&amp;b=3">Logout</a>
</td>
<td class="maintab_last"> </td>
</tr>
</table>
<div id="logged_in_check_posts">
<span style="display:none">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJuuMKWhpD%3D%3D&amp;b=3">Show unread posts since last visit.</a> ยท
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJuuMKWhpJIlL3y2pzL%3D&amp;b=3">Show new replies to your posts.</a><br />
</span>
</div>
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;"><table style="margin: 0 auto;"  width="100%">
<tr><td width="100%" valign="top" align="center"  id="column4" >
      <table class="bordercolor" width="100%"><tr>
<td class="catbg" valign="center"> <span style="float:right"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9jLay5ozAzpv50qaZ%3D&amp;b=3"  alt="+-" /></span>OmnomIRC</td>
</tr>
<tr class="windowbg2"><td id="block83" ><iframe src ="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8iLacuLabhLacuqachqT4hLzI0Y0W6LJW6IxIDK1SlnF9PrzSvryMSHTxlYaIarax%3D&amp;b=3&amp;f=frame" width="100%" height="280" frameborder="0" name=%2526quot%253BOmnomIRC%2526quot%253B%2526gt%253B
Your browser does not support iframes.
</iframe>

</span>
<center><span style="font-size: 10px;">Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYaWmLKWaYzWyqP8%2FrzWknUylCJMlMJylMJL%3D&amp;b=3">EFnet server</a> and #omnimaga.</span></b>
</center>

<form style="Display:inline;" name=%2526quot%253Birc%2526quot%253B action=""  method="post"><input type="hidden" name=%2526quot%253BconvertGET%2526quot%253B value="1" /><center><input type="text" name=%2526quot%253Bmessage%2526quot%253B id="message" size="128" maxlength="256"  /><input type="submit" value="Send" /></center></form>
</td>
</tr></table>
</td></tr>
</table><br />
<table style="margin: 0 auto;"  width="100%">
<tr><td width="60%" valign="top"  id="column2" >
      <table class="bordercolor" width="100%"><tr>
<td class="catbg" valign="center">Latest Forum Activity</td>
</tr>
<tr class="windowbg2"><td id="block91" ><center><b>Latest 200 active topics | <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJuuMKWhpJIlL3y2pzL%3D&amp;b=3">Replies to your posts</a> | <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJIlpUWuMj%3D%3D&amp;b=3">Latest 100 posts</a></b></center></td>
</tr><tr>
<td class="catbg" valign="center">Users Online In The Past 30 Minutes</td>
</tr>
<tr class="windowbg2"><td id="block101" >
64 Guests, 13 Users
(0 Buddies)<br /><a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZmL%3D&amp;b=3" style="color: #008800;">Deep Thought</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kAmt%3D&amp;b=3" style="color: #000000;">Runer112</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ02&amp;b=3" style="color: #008800;">calc84maniac</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZQR0&amp;b=3" style="color: #000000;">Scout</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ05BQx%3D&amp;b=3" style="color: #000000;">rayquaza59</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0lZQt4&amp;b=3" style="color: #000000;">Anima</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0lZGt%3D&amp;b=3" style="color: #771111;">rcfreak0</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZwR%3D&amp;b=3" style="color: #0000FF;">Builderboy</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ05AQR%3D&amp;b=3" style="color: #000000;">Aichi</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZmH%3D&amp;b=3" style="color: #000000;">BrownyTCat</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ05ZmL%3D&amp;b=3" style="color: #000000;">JosJuice</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ03Zmt%3D&amp;b=3" style="color: #000000;">TC01</a>, <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZGRk&amp;b=3" style="color: #000000;">ruler501</a></td>
</tr><tr>
<td class="catbg" valign="center">Latest 200 Active Topics (Sorted By Last Reply)</td>
</tr>
<tr class="windowbg2"><td id="block74" >
<table border="0">
<tr>
<td align="right" valign="top">
[<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2Fo2WhMKR9BQHhZN%3D%3D&amp;b=3">ASM Language</a>]
</td>
<td valign="top">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9BQZ3AF56MaDkAGLkZmN7M2WwqaOzpaV%3D&amp;b=3#new">David's Z80 Assembly Questions</a>
by <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZQR0&amp;b=3"><font color="#000000">Scout</font></a>
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9BQZ3AF56MaDkAGLkZwx7M2WwqaOzpaV%3D&amp;b=3#new"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9lLKE5qzM1Y2Slnv50qaZ%3D&amp;b=3" alt="New" border="0" /></a>
</td>
<td align="right" nowrap="nowrap">
<b>Today</b> at 08:15
</td>
</tr>
<tr>
<td align="right" valign="top">
[<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2Fo2WhMKR9AmRhZN%3D%3D&amp;b=3">The Axe Parser Project</a>]
</td>
<td valign="top">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9ZGD1Zl56MaDkAGLkZwp7M2WwqaOzpaV%3D&amp;b=3#new">Axe Parser</a>
by <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZmL%3D&amp;b=3"><font color="#008800">Deep Thought</font></a>

</td>
<td align="right" nowrap="nowrap">
<b>Today</b> at 08:09
</td>
</tr>
<tr>
<td align="right" valign="top">
[<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2Fo2WhMKR9BP4j&amp;b=3">Pixel Art And Drawing</a>]
</td>
<td valign="top">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9BQZ5Zv56MaDkAGLkZwR7M2WwqaOzpaV%3D&amp;b=3#new">Need graphics for RPG</a>
by <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0lZQt4&amp;b=3"><font color="#000000">Anima</font></a>
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9BQZ5Zv56MaDkAGDlAmx7M2WwqaOzpaV%3D&amp;b=3#new"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9lLKE5qzM1Y2Slnv50qaZ%3D&amp;b=3" alt="New" border="0" /></a>
</td>
<td align="right" nowrap="nowrap">
<b>Today</b> at 07:41
</td>
</tr>
<tr>
<td align="right" valign="top">
[<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2Fo2WhMKR9ZGLlYwN%3D&amp;b=3">Axe Language</a>]
</td>
<td valign="top">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9ZGL4Zv56MaDkAGLkZwN7M2WwqaOzpaV%3D&amp;b=3#new">Physics Lessons</a>
by <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZwR%3D&amp;b=3"><font color="#0000FF">Builderboy</font></a>

</td>
<td align="right" nowrap="nowrap">
<b>Today</b> at 07:39
</td>
</tr>
<tr>
<td align="right" valign="top">
[<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2Fo2WhMKR9AF4j&amp;b=3">Other Calc-Related Projects And Ideas</a>]
</td>
<td valign="top">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9AGt2Al56MaDkAGLkZGx7M2WwqaOzpaV%3D&amp;b=3#new">Eitrix for TI-84 Plus</a>
by <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FoaOaqzWuCJAyLaA2rKV7nQ0kZQR0&amp;b=3"><font color="#000000">Scout</font></a>
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP92LKSlnl5wqJZ%2FM2WwqaN9AGt2Al56MaDkZwtmBQH7M2WwqaOzpaV%3D&amp;b=3#new"><img src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9lLKE5qzM1Y2Slnv50qaZ%3D&amp;b=3" alt="New" border="0" /></a>
</td>
<td align="right" nowrap="nowrap">
<b>Today</b> at 07:36
</td>
</tr>
</table></td>
</tr></table>
<p><br /><strong>&nbsp;</strong></p></td>
</tr>
</table><div align="center"><span class="smalltext">Powered by <a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYaWgL2WyM255YaOvrt%3D%3D&amp;b=3" target="blank">EzPortal</a></span></div>
</div>

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;">

<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td align="center" style="white-space: nowrap;">
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYacfMzE5YaOvrv8%3D&amp;b=3" target="_blank"><img id="powered-mysql" src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9wLzclMKWkYKcfMzE5YaE2pj%3D%3D&amp;b=3" alt="Powered by MySQL" width="54" height="20" style="margin: 5px 16px;"   /></a>

<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"><a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzM2rzA5pachpUI2LKWzYzWyqP8%3D&amp;b=3" title="Simple Machines Forum" target="_blank">Powered by SMF 1.1.13</a> |
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzM2rzA5pachpUI2LKWzYzWyqP9ho2WbMl9jLzAfMKM0qJphL3Iw&amp;b=3" title="Free Forum Software" target="_blank">SMF &copy; 2006-2011, Simple Machines LLC</a>
</span>
<a href="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzA1Ll5upzpi&amp;b=3" target="_blank"><img id="powered-php" src="http://szas.info/go.php?a=a8d917fe12186cc4cfBv8inzcdYzW6LKM6oaEhYzWyqP9UqKW6pzLiDacuqachqT40LaykY3M6oaElMv9wLzclMKWkYJA1Ll50qaZ%3D&amp;b=3" alt="Powered by PHP" width="54" height="20" style="margin: 5px 16px;"   /></a>
</td>
</tr>
</table>
<span class="smalltext">Page created in 0.233 seconds with 29 queries.</span>

<span style="font-size: smaller">

<br />Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.<br />All programs, games and songs avaliable on this website are property of their respective owners.<br />Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.</span></div>
<div id="ajax_in_progress" style="display: none;">Loading...</div>
</body></html>

One (XML) was built for parsing, the other (HTML) a nightmare.[/code]
Title: Re: Random Topic Button
Post by: DJ Omnimaga on May 20, 2011, 12:54:09 am
Hmm it would be nice if it listed the topic title instead of redirecting or something, although it would slow down the forums I think, if done via JS.
Title: Re: Random Topic Button
Post by: calcdude84se on May 20, 2011, 01:01:46 am
Yay Deep for working on this. :D
It doesn't seem from your description that it takes you to an unread topic (not the same as a topic you weren't the last to post in ;)), though. For that, though, it'd have to be a mod on the forum or a personal script, since that would require reading the logged-in user's browser cookie to be able to authenticate and get data as them.
Title: Re: Random Topic Button
Post by: DJ Omnimaga on May 20, 2011, 01:29:51 am
TYeah I think it would have to be a PHP mod, since it would also integrate itself below the posts.
Title: Re: Random Topic Button
Post by: ruler501 on May 28, 2011, 08:25:33 pm
I'll settle with making sure it doesn't go to the one where the last post was by me.
Is the link the one for last 200 and not last post by you?
Title: Re: Random Topic Button
Post by: Deep Toaster on May 28, 2011, 09:18:06 pm
I'll settle with making sure it doesn't go to the one where the last post was by me.
Is the link the one for last 200 and not last post by you?

What link? And what do you mean by that? Both scripts take a random recent post and redirect there, only difference being that the first one only works for the past five posts.
Title: Re: Random Topic Button
Post by: ruler501 on May 28, 2011, 09:19:47 pm
Never mind then
Title: Re: Random Topic Button
Post by: pianoman on May 28, 2011, 09:35:17 pm
Would this be something like Wikipedia's random article button?
Title: Re: Random Topic Button
Post by: ruler501 on May 28, 2011, 09:45:08 pm
Thats exactly what this is like
Title: Re: Random Topic Button
Post by: Deep Toaster on May 28, 2011, 11:04:04 pm
Would this be something like Wikipedia's random article button?

Except that it shows only one of the most recent posts, so people don't necropost ;)
Title: Re: Random Topic Button
Post by: ruler501 on May 28, 2011, 11:46:53 pm
can you make it so it only goes to the most recent post in the topic. When I keep using it I seem to continuous go to older posts than the latest one
Title: Re: Random Topic Button
Post by: Deep Toaster on May 29, 2011, 12:06:48 am
Seems like http://www.omnimaga.org/index.php?action=.xml;type=rss2 isn't always updated. I'll change it to display the first new post then (the first post in the thread you haven't read).

EDIT: Done.

http://clrhome.co.cc/b/omninew/

Again:

Quote from: PHP
$feed = new DOMDocument();
$feed->load('http://www.omnimaga.org/index.php?action=.xml;type=rss2;limit=100');
$feed = $feed->getElementsByTagName('guid')->item(rand(0,99))->nodeValue;
header('Location: ' . substr($feed, 0, strpos($feed, 'msg')) . 'new#new');

I really love this [php] tag :D

EDIT: Update here (http://ourl.ca/11024/214312)
Title: Re: Random Topic Button
Post by: DJ Omnimaga on May 29, 2011, 01:13:18 am
Nice. I guess the rss not being updated is probably due to it updating itself only every few hours or so.
Title: Re: Random Topic Button
Post by: Deep Toaster on May 29, 2011, 11:19:49 am
Are you able to get the username of who's going to the page(the user)?
Couldn't you try the parse the new posts page for that? I think that might be easier

Guess I did end up using that. It got really messy, but it means a couple of improvements: it will always be updated (instead of having to wait for the RSS feed to update itself), and you can now choose to avoid your own posts by putting ?avoid=NAME after the URL ;D

http://clrhome.co.cc/b/omninew/?avoid=YOUR+NICK+HERE (http://clrhome.co.cc/b/omninew/?avoid=ruler501 for you, ruler)

Slightly longer this time:

Quote from: PHP
$feed = new DOMDocument();
$feed->loadHTMLFile('http://www.omnimaga.org/index.php?action=ezportal;sa=page;p=5');
$feed = $feed->getElementById('block74')->getElementsByTagName('tr');

do
{
    $item = $feed->item(rand(0,99))->childNodes->item(2);
}
while (strtolower($item->lastChild->previousSibling->nodeValue) == strtolower($_GET['avoid']));

$item = $item->firstChild->nextSibling->getAttribute('href');
header('Location: ' . substr($item, 0, strpos($item, 'msg')) . 'new#new');
Title: Re: Random Topic Button
Post by: ruler501 on May 29, 2011, 11:40:27 am
Thank you for singling me out for this award Deep Thought :). Maybe someone could add a mod to the site that will put this on the forum page or up on the top and auto ad the users name.

EDIT: Deep Thought while clicking around with it I still see it going to posts that aren't at the bottom. Its going to the first post in this topic http://ourl.ca/11156.new#new

EDIT2: it seems to be doing it on other topics also
Title: Re: Random Topic Button
Post by: Deep Toaster on May 29, 2011, 11:56:53 am
EDIT: Deep Thought while clicking around with it I still see it going to posts that aren't at the bottom. Its going to the first post in this topic http://ourl.ca/11156.new#new

EDIT2: it seems to be doing it on other topics also

It goes to the first new post, the first post you haven't read :) It's like with email notifications.
Title: Re: Random Topic Button
Post by: ruler501 on May 29, 2011, 11:59:34 am
I don't do email notifs so I wouldn't know, but that makes sense
Title: Re: Random Topic Button
Post by: Deep Toaster on May 29, 2011, 12:13:51 pm
Thank you for singling me out for this award Deep Thought :). Maybe someone could add a mod to the site that will put this on the forum page or up on the top and auto ad the users name.

Or host it here. Doesn't really make sense that a random topic script be hosted outside the forum lol
Title: Re: Random Topic Button
Post by: ruler501 on May 29, 2011, 12:15:42 pm
I'll keep it bookmarked till it is added into the forums
Title: Re: Random Topic Button
Post by: calcdude84se on May 31, 2011, 12:25:53 am
Is it going to the first post after where you last posted in the topic or to the first unread post? (I still need to try it out, so I'm just trying to clarify.)
At any rate, nice! :D
Title: Re: Random Topic Button
Post by: ruler501 on May 31, 2011, 12:26:59 am
It goes to the first unread post
Title: Re: Random Topic Button
Post by: Deep Toaster on June 02, 2011, 11:34:35 pm
Yep, first unread post. The forum already has a nice feature for that -- http://www.omnimaga.org/index.php?topic=####.new#new goes straight there.
Title: Re: Random Topic Button
Post by: ruler501 on June 02, 2011, 11:35:21 pm
DeepThought that link doesn't work :(
Title: Re: Random Topic Button
Post by: Deep Toaster on June 03, 2011, 11:12:48 am
That wasn't an actual link. #### stands for the topic number, so it would be http://ourl.ca/11024.new#new for the first new post in this topic.
Title: Re: Random Topic Button
Post by: ruler501 on June 03, 2011, 11:18:17 am
I know but I still clicked on it to see what it would do