I have another site (non nuke) that I list the latest headlines from my nuke site's multiheadline news table.
Is it possible to trigger the auto refresh from this non nuke site?
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Friday 08 June, 2007 14:06
Posted: Friday 08 June, 2007 22:55
Yes it is.
Modding a little bit the getrss.php will do for you.
Aikon Site Admin
Joined:
Posts: 802
Location: 21º57´E - 47º03´N
Friday 08 June, 2007 22:55
Posted: Friday 08 June, 2007 23:48
Cool
I've removed stupid google but have got stuck at
Fatal error: Call to a member function on a non-object
Code:
$num_news = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_news"));
I guess it's about db access but i'm not sure what to do.
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Friday 08 June, 2007 23:48
Posted: Saturday 09 June, 2007 00:24
Forget the error above, I forgot to put some code back.
It doesn't show any errors so i'm hoping it's ok. All i've done is take out the if stupid google line.
Is that what you meant or is there more I should look at?
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Saturday 09 June, 2007 00:24
Posted: Saturday 09 June, 2007 01:29
lol stupid hinkstar
This what i've changed, does it look ok?
Code:
if (eregi("getrss.php", "http://www.mydomain.com")) {
Header("Location: http://www.google.com/search?hl=en&q=define%3A+stupid&btnG=Google+Search");
die();
}
global $db;
include_once("http://www.mynukedomain.com/modules/Multiheadlines/functions.php");
#####################################################################
if (intval("http://www.mynukedomain.com/modules/Multiheadlines"))
$config = $db->sql_fetchrow($db->sql_query("SELECT * FROM nuke_multiheadlines_config")); {
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Saturday 09 June, 2007 01:29
Posted: Saturday 09 June, 2007 09:14
No it's not OK.
Leave that "google stupid" alone. That is against direct access of this file.
Every database access is made through $db class....so you have to tell to script what is "$db". You have to include, before, the file where this class is defined[i think is /db/mysql.php]
Also there is a function is_active in this file that is defined in mainfile.php so you have to include this file too.
When including something use the phisical path to that file[which have to be on the same domain] e.g. something like "/home/user/public_html/your_domain_folder/path_to_the_file"
Aikon Site Admin
Joined:
Posts: 802
Location: 21º57´E - 47º03´N
Saturday 09 June, 2007 09:14
Posted: Saturday 09 June, 2007 14:23
Here's the changes i've made. I'm not getting any errors but it doesn't appear to be working.
Code:
if (eregi("getrss.php", $_SERVER['PHP_SELF'])) {
Header("Location: http://www.google.com/search?hl=en&q=define%3A+stupid&btnG=Google+Search");
die();
}
global $db;
include_once("/path/mainfile.php");
include_once("/path/modules/Multiheadlines/functions.php");
include_once("/path/db/mysql.php");
#####################################################################
if (is_active("Multiheadlines")) {
$config = $db->sql_fetchrow($db->sql_query("SELECT * FROM nuke_multiheadlines_config"));
I wonder if I have some other problems with this. I've just changed my host and when I go to the nuke site it only seems to refresh 1 feed per page view (I could be mistaken on this). is this a problem with my host or the way multiheadlines works?
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Saturday 09 June, 2007 14:23
Posted: Saturday 09 June, 2007 15:28
No, this is how MH works. Only one url feed refresh per hit.
Aikon Site Admin
Joined:
Posts: 802
Location: 21º57´E - 47º03´N
Saturday 09 June, 2007 15:28
Posted: Saturday 09 June, 2007 17:39
Still haven't got it working, anything else I could do?
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Saturday 09 June, 2007 17:39
Posted: Saturday 09 June, 2007 17:52
....sorry....I gave you the general picture of to do it.
Since I don't know how are exactly the things on your non-nuke site I can't know the right solution.
I rather would like to reffer to Multiheadlines modding as a php-nuke addon.
The time now is Wednesday 03 December, 2008 23:11 | All times are GMT + 2 Hours
Page 1 of 1
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum