Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Xpresskonami on April 27, 2015, 02:53:16 AM

Title: WAP, RSS questions
Post by: Xpresskonami on April 27, 2015, 02:53:16 AM
Anybody should please tell me what to do to get this fix.....

Am using smf. Both wap2 and full version. But the problem am having in my smf wap2 is the updates. Am using RSS feeds updates, My feeds update am using in my wap2 always get error in which it won't display the recent topic created again. So after 12 or 6 hours it will later show


Admin! I try to fix this updates error! But I haven't got it yet......

Help!
Title: Re: Re: Automatic Poster Custom MOD Request: Start Topics and Post Auto Replies
Post by: margarett on April 27, 2015, 07:11:32 AM
Please don't hijack other people's topics with completely unrelated content...

I'm not sure if I understand your issue but, if something only updates after some time, you have some kind of cache in place.
Title: Need Smf Wap2 post updates like that of wordpress and other script.
Post by: Xpresskonami on April 27, 2015, 01:48:10 PM
Have been searching for the Smf wap2 updates code. Like that of wordpress. Whenever I created topic for this assistance! Either it got deleted or block.

This forum is for help and sharing of ideas. I need this code, that's why I come down here to ask.

Having been using SMF over 2 years now! Still yet I haven't got the Wap2 updates. Like the wordpress own.

Who so ever is using Wordpress or not! If you created a topic in Wordpress, it will automatically updates itself.

How can I got the smf own?????

I really need this for my Wap2 mod!

Please and please share this code for me! I love Smf than wordpress. I don't want to leave this forum to wordpress!!!

Title: Re: Need Smf Wap2 post updates like that of wordpress and other script.
Post by: margarett on April 27, 2015, 01:51:01 PM
I can't understand what you want to do...
I split your previous post because you hijacked other member's topic
http://www.simplemachines.org/community/index.php?topic=535907.0

I don't know what WP does regarding WAP2. And WAP2 is dying with the new phones.
Unless you explicitly explain what you want to do, we can't help you...
Title: Need Help please! Don't delete my topics admin.
Post by: Xpresskonami on April 27, 2015, 02:42:11 PM
Have been searching for the Smf wap2 updates code. Like that of wordpress. Whenever I created topic for this assistance! Either it got deleted or block.

This forum is for help and sharing of ideas. I need this code, that's why I come down here to ask.

Having been using SMF over 2 years now! Still yet I haven't got the Wap2 updates. Like the wordpress own.

Who so ever is using Wordpress or not! If you created a topic in Wordpress, it will automatically updates itself.

How can I got the smf own?????

I really need this for my Wap2 mod!

Please and please share this code for me! I love Smf than wordpress. I don't want to leave this forum to wordpress!!!

Title: Re: Need Help please! Don't delete my topics admin.
Post by: Illori on April 27, 2015, 02:56:45 PM
http://www.simplemachines.org/community/index.php?topic=535907.0

please search before posting the same thing mulitple times.
Title: Re: WAP, RSS questions
Post by: Kindred on April 27, 2015, 03:09:05 PM
Your posts have not been deleted.  You posted the same thing, three times now -- the first time, you posted in a thread which had nothing at all to do with your question - and so, it was split off into its own thread.

You then posted, accusing us of deleting your post...   it was pointed out that the post was not deleted. -- and then I merged it with your original.
You then posted **AGAIN**, accusing us of deleting.  AGAIN, it was pointed out that the post was not deleted. -- and then I merged it with your original.

STOP POSTING NEW THREADS.   Your original question and all of your repeat questions are still visible, IN THIS THREAD.




Now, as for ANSWERING your question....

You are going to have to be more clear in your question...  because, in ALL THREE ATTEMPTS of your question, you have made VERY LITTLE SENSE!

1- WAP != RSS   they are not the same thing at all.
2- AFAIK, WordPress does not actually have a WAP mode


So, are you asking about WAP (which is a "light" version of the forum, intended for people on old-fashioned mobile devices who don't actually have real graphics support or real browsers... or are you asking about RSS, a list of links - usually just thread titles and links to the thread (sometimes including part of the post) (which is something completely different from WAP)??
Title: Re: WAP, RSS questions
Post by: Xpresskonami on April 27, 2015, 03:15:47 PM
an so sorry about the reposting replies...... what I need is
if I make topic in smf.... I want auto update code that i will  place in my homepage or main menu which it will show my latest updates I post.....
Title: Re: WAP, RSS questions
Post by: Xpresskonami on April 27, 2015, 03:42:46 PM
Am trying to use this code for my smf wap2 updates


<?php $rss = new DOMDocument();
$rss->load('http://www.spyloaded.com/index.php?action=.xml;type=rss;sa=news;limit=25;boards=5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50');
$feed = array();
foreach (
$rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,
);
array_push($feed$item);
}
echo 
'<strong><div class="titlebg">Latest Post<br></div></strong>';
$limit 25;
for(
$x=0;$x<$limit;$x++) {
$title str_replace(' & '' &amp; '$feed[$x]['title']);
$link $feed[$x]['link'];
$description $feed[$x]['desc'];
$date date('l F d, Y'strtotime($feed[$x]['date']));
echo 
'<div class="pagination"><a href="'.$link.'" title="'.$title.'"><div class="box"><table width="100%"><tbody><tr><td align="left"><img src="http://www.spyloaded.com/Themes/icons/spynews.jpg" height="45px" width="45px"></td><td><b>'.$title.'</b><br><div align="right"><font color="red"> '.$date.'</font></div></div></td></tr></tbody></table></div></a></div>';
}
?>



It works but the main problem am having is.

At any time the code will stop showing all the post. And after some hours it will display back.

Am looking for the good working one.
Title: Re: WAP, RSS questions
Post by: Kindred on April 27, 2015, 04:03:56 PM
that has nothing at all to do with WAP!


Why are you using RSS for that?

If your homepage is on the same domain/server as your forum, then all you need to use is SSI
- specifically 

ssi_recentPosts(25, null, array(5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50), echo);

Title: Re: WAP, RSS questions
Post by: Xpresskonami on April 27, 2015, 04:47:37 PM
Quote from: Kindred on April 27, 2015, 04:03:56 PM
that has nothing at all to do with WAP!


Why are you using RSS for that?

If your homepage is on the same domain/server as your forum, then all you need to use is SSI
- specifically 

ssi_recentPosts(25, null, array(5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50), echo);


how will I go with the code.... can you please get me the full code??? for it. so I can use it.....

Title: Re: WAP, RSS questions
Post by: Kindred on April 27, 2015, 04:50:16 PM
That *IS* the full code...  with the exeption of the require('SSI.php); that is needed

http://wiki.simplemachines.org/smf/SSI_FAQ_Basic

Although with that list of boards, it might actually be easier to use the EXCLUDE list rather than the INCLUDE list
Title: Re: WAP, RSS questions
Post by: Xpresskonami on April 28, 2015, 04:45:06 PM
Do you mean the code will be placed Like this ??????

<?php

$rss 
= new DOMDocument();
require(
"MY_PATH_TO_SSI.php");
ssi_recentPosts(25null, array(5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50), echo);
$feed = array();
foreach (
$rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,
);
array_push($feed$item);
}
echo 
'<strong><div class="titlebg">Features<br></div></strong>';
$limit 25;
for(
$x=0;$x<$limit;$x++) {
$title str_replace(' & '' &amp; '$feed[$x]['title']);
$link $feed[$x]['link'];
$description $feed[$x]['desc'];
$date date('l F d, Y'strtotime($feed[$x]['date']));
echo 
'<div class="pagination"><a href="'.$link.'" title="'.$title.'"><div class="box"><table width="100%"><tbody><tr><td align="left"><img src="http://www.spyloaded.com/Themes/icons/spynews.jpg" height="45px" width="45px"></td><td><b>'.$title.'</b><br><div align="right"><font color="red"> '.$date.'</font></div></div></td></tr></tbody></table></div></a></div>';
}
?>

Title: Re: WAP, RSS questions
Post by: Kindred on April 28, 2015, 05:57:16 PM
No.... You don't need any of that crap.

If you are displaying the posts, then the ssi function is all you need... Hence the echo statement in the function call.

If you are trying to get at an RSS feed, then why don't you use the existing RSS feed that smf already produces?
Title: Re: WAP, RSS questions
Post by: Xpresskonami on April 28, 2015, 06:09:22 PM
where will I get the new Rss feed???
Title: Re: WAP, RSS questions
Post by: margarett on April 28, 2015, 06:31:07 PM
Here (you are already using it)
http://www.spyloaded.com/index.php?action=.xml;type=rss;sa=news;limit=25;boards=5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50
Title: Re: WAP, RSS questions
Post by: Xpresskonami on April 29, 2015, 02:24:29 AM
Quote from: margarett on April 28, 2015, 06:31:07 PM
Here (you are already using it)
http://www.spyloaded.com/index.php?action=.xml;type=rss;sa=news;limit=25;boards=5,6,7,4,10,11,12,16,18,19,14,15,17,47,50,20,23,33,24,26,21,32,36,29,27,31,28,25,30,34,51,38,39,8,9,13,22,21,25,35,36,37,42,40,41,42,43,44,45,46,47,48,49,50

Yes I know! But the problem am really facing in the script is.........

Sometimes the recent topics will stop showing.

After some few hours! It will show back.

That's why I ask for the solution.

If I have to use the "ssi_recentpost" it will display if users reply to the topic it will show it also! But I only want it to display Latest topic post without latest replies!

Title: Re: WAP, RSS questions
Post by: Kindred on April 29, 2015, 06:27:32 AM
then you should use ssi_recentTopics
Title: Re: WAP, RSS questions
Post by: margarett on April 29, 2015, 11:04:21 AM
RSS should work. AFAIK there is no cache in SMF for RSS feeds so one of 2 things happen:
1 - Your host has some kind of caching in place, so you can only gather updated info when the cache is refreshed.
2 - Whatever script you use to fetch these RSS feeds is configured to only fetch info every "xx" minutes. It seems to be a SimplePortal block, but I have no idea if the info it gathers is or isn't cached...

I would suggest that it has nothing to do with SMF.

For you to use ssi_recentTopics, you need to change that script a lot. Because I have no idea what it is, I can't help you with it. Your best chance is to try to understand why this caching happens and fix it.
Title: Re: WAP, RSS questions
Post by: Xpresskonami on May 01, 2015, 06:38:30 PM
ok. thankx...... and please admin how can I stop 2 created topic in my smf. examples. if I create topic. it sometimes double the topic I created. so I want to stop the double created topic. with a sript which it will says "You have already created this topic"
Title: Re: WAP, RSS questions
Post by: Kindred on May 01, 2015, 08:12:38 PM
Smf does  not create double topics/posts... if yours is doing so, then you have screwed up something pretty majorly.