Thread: Latest Topics widget

  1. #1
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827

    Latest Topics widget

    Hello all.
    I really appreciate all the help I have received so far from the people on these forums.
    Hopefully someone will be able to help with this problem I have. It is not a C/C++ programming problem, but rather involves web coding skills instead.

    Basically, the problem that I have is I want the "Latest Topics" widget that I have on my Forumotion forums, which displays all the recent posts that were made on the forum, to work on my main site as well. This is not exactly the easiest thing to accomplish. I tried the following code, but though it displays correctly (and even scrolls the posts), it wont update when a new post is made:

    <p><link rel="alternate" type="application/rss+xml" title="Latest topics (RSS 2.0)" href="http://ets-forums.forumotion.com/feed/"></link><link rel="alternate" type="application/atom+xml" title="Latest topics (ATOM)" href="http://ets-forums.forumotion.com/feed/?type=atom"></link></p>
    <script src="http://illiweb.com/fa/js_06/en.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[

    $(document).ready(function(){});//]]></script><script src="http://illiweb.com/fa/js_06/invision.js" type="text/javascript"></script><div class="minwidth_IE"><div class="layout_IE"><div class="container_IE"><div id="ipbwrapper"><a id="top" name="top" accesskey="t"></a>
    <div style="height:4px"></div><div class="module borderwrap"><div class="maintitle"><h3>Latest topics</h3></div><div class="box-content"><div id="comments_scroll_div" style="height:200px;overflow:auto">» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/movies-f32/the-new-movie-2012-t12.htm#49">The new movie '2012'!</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Today at 1:44 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/the-moderating-team-f38/assigning-moderators-t3.htm#44">Assigning Moderators</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Today at 11:59 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=2"><span style="color:#000099"><b>Dark Knight</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/forum-games-f3/count-to-one-million-t4.htm#43">Count to one million!</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Today at 11:57 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=2"><span style="color:#000099"><b>Dark Knight</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/the-rest-of-the-world-f18/copter-crash-kills-16-in-afghanistan-nato-says-t11.htm#40">Copter crash kills 16 in Afghanistan, NATO says</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Today at 3:22 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/israel-f14/israel-rejects-us-call-to-halt-jerusalem-project-t10.htm#39">Israel rejects U.S. call to halt Jerusalem project</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Today at 3:08 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/china-f13/china-says-police-killed-12-in-urumqi-rioting-t9.htm#38">China says police killed 12 in Urumqi rioting</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Yesterday at 15:22 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/israel-f14/israel-told-to-halt-east-jerusalem-housing-project-t8.htm#37">Israel told to halt east Jerusalem housing project</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Yesterday at 15:19 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/the-water-cooler-f39/share-your-favorite-pics-t7.htm#36">Share your favorite pics!</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Yesterday at 1:43 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/general-discussion-f1/welcome-to-the-expert-technology-storehouse-forums-t1.htm#33">Welcome to the Expert Technology Storehouse forums!</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Sat 18 Jul 2009 - 2:57 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=4"><span style="color:#000099"><b>mikehell</b></span></a><br/><br/>» <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/feedback-suggestions-f5/designing-the-ets-forums-logo-t6.htm#31">Designing the ETS Forums logo</a><br/><img src="http://illiweb.com/fa/empty.gif"/>Sat 18 Jul 2009 - 2:24 by <a onmouseover="document.getElementById('comments_scr oll_container').stop();" onmouseout="document.getElementById('comments_scro ll_container').start();" href="http://ets-forums.forumotion.com/profile.forum?mode=viewprofile&amp;u=1"><span style="color:#000099"><b>Coolname007</b></span></a><br/><br/></div></div></div><script type="text/javascript">//<![CDATA[
    div_marquee('comments_scroll_div', 'comments_scroll_container', 'up', '2', '90', '200', 'genmed');//]]></script><div style="height:4px"></div></div></div></div></div>
    It is a combination of HTML and Javascript. I obtained the code from the forums themselves (by going to the home page, and View>Page Source in my browser), but it seems the posting code must be the one responsible for updating the Latest Topics widget when a new post is made. Therefore I need a different solution if possible.

    Thanks in advance for any help.

    P.S. I tried some of the "Recent Forum Posts" widgets offered out there on the Web, but I couldn't find anything that I liked, or would even work on my site.

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Programmer_P View Post
    It is a combination of HTML and Javascript. I obtained the code from the forums themselves (by going to the home page, and View>Page Source in my browser), but it seems the posting code must be the one responsible for updating the Latest Topics widget when a new post is made.
    And you have done a good job of formatting it here for us all to read, too. The answer to the question in bold is NO.

    I think cutting and pasting code will only get you so far. You may need to (eg) start learning some javascript, etc. Here's a big catch with the using "page source" from your browser: It is very often (or almost always, with something like this) generated by a server side script; in other words you are looking at a particular instance of some output, and not the mechanism that produced it. If you want to know how to create something "which displays all the recent posts that were made on the forum", this code will *not* tell you that. This is the output of something which did that, it is not the script which actually did it. You cannot access that via the page source.

    Another issue:
    Code:
    <script src="http://illiweb.com/fa/js_06/invision.js" type="text/javascript">
    Hmmm, I wonder what that is and if it is important? Probably some of the javascript functions called, eg "div_marquee", are in there (altho actually it is not, since I just looked at:

    http://illiweb.com/fa/js_06/invision.js

    In any case, javascript is not responsible for the server-side processing at the core of your desire. And server side scripts are generally not publicly accessible.

    Last but not least, why don't you try a web programming forum? There are lots of them around and plenty of people willing to help absolute beginners. They may also have some more helpful advice on how to set out accomplishing what you want, etc.
    Last edited by MK27; 07-24-2009 at 09:27 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. xuni: a Graphical User Interface Widget Toolkit
    By dwks in forum Projects and Job Recruitment
    Replies: 45
    Last Post: 06-04-2008, 02:35 PM
  2. Results of March Monthly Contest
    By PJYelton in forum Contests Board
    Replies: 23
    Last Post: 04-17-2005, 09:46 AM
  3. Wierd Segmentation Faults on Global Variable
    By cbranje in forum C Programming
    Replies: 6
    Last Post: 02-19-2005, 12:25 PM
  4. Replies: 2
    Last Post: 09-09-2004, 12:57 PM
  5. Help require for some data structure topics
    By jawwadalam in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 12-15-2002, 07:09 PM