| Author |
Message |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
Trackback / xmlrpc / RSS improvement |
|
Is it possible to improve these plugins?
Thing I would liked added to trackback:
Favorite pings - list of favorite pingadresses which would be inserted if selected
Thing I would liked added to xmlrpc:
Possibility to change the ping configurations such as the HTTP Request Headers and xml-message being sent.
Thing I would liked added to RSS:
Track how many and some other stats about our subscribers to the RSS feeds
would really rock
Sorry I'm so slow learning how to fix these things myself...
*sigh so much I should learn besides xhtml and css... 
_________________ My cute.ru site |
|
| Sun Aug 27, 2006 10:11 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
|
|
okay I've tried to start this thing, but things go waaaay slow because of my lack of skill...
so far this is what I got:
to write the script we'l need a input where the inserted text will be added to a txt file.. something like:
 |  |
$write = //some code to get the inserted text
$file = 'pings.txt';
$file_handle = fopen($file, w);
fwrite($file_handle, $write);
fclose($file_handle);
|
and then a code to read the text form the textfiles and put it in a select dropdown...
 |  | <?php
function Gen_List ($File, $Name) {
// Read the data from the file, and start start drop-down list.
$Data = file ($File);
$Output = '<select name="'.$Name.'">'."\n";
// Loop through the data.
for ($Run = 0; isset ($Data[$Run]); $Run++) {
// Remove whitespaces and check if line contains data.
if (!($Line = trim ($Data[$Run]))) {
// Didn't, skip.
continue;
}
// Add to list.
$Output .= "\t<option value=\"$Run\">".htmlentities ($Line)."</option>\n";
}
// Add end of selection list, and return content.
return $Output."</select>\n";
}
?>
<html>
<head>
<title></title>
</head>
<body>
<?php
// print liste
echo Gen_List('ping.txt', 'Pingadresses'); // printer listen
?>
</body>
</html> |
well.. is this a start worth continuing? is this usefull for others besides me?
don't ask me how it's working.. I've read code from thousands of sites trying to copy some pieces togehter and was so drugged on coffein I don't remember shit... You can see from the first post to this one how long it have taken me.. please help me 
_________________ My cute.ru site |
|
| Thu Sep 07, 2006 8:03 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2818 Location: Germany |
|
|
|
Yes, the code will work. But I don't understand what you are trying to do? What's supposed to be in pings.txt?
Besides, I have no idea what trackbacks and pings are and how they work. 
|
|
| Thu Sep 07, 2006 8:15 pm |
|
 |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
|
|
Okay..
Trackbacks are a way for news site to communicate with other newssites..
Example:
I write a news text about football and to create that text I use ideas from another post I've read elsewhere. To credit the original author, and to get more hits to my site I ping the trackback adress to that post. In CNR it'll be typicallly something like site.com/post/title.tb. Then in his comments there will be a comment saying my post pinged his, a sample form my text and the link to it, so the origiannly owner can see what his ideas are used to.
example 2:
There are lots of newsaggeregators or newsportals out there. They have a ping adress where all posts that ping them, will be added to their site. Say I write a text about football and I ping a newsportal, then my text, or a sample of it will show on their site.
It's the 2nd example I'm trying to change the way things are now. The thing I want to accomplish is to improve the way we are pinging from CNR. The way it is now, we have to manually type in the ping-adresses to our favorite news-portals for each post we make. I would like it to be possible to store the favorite ping-adresses in a txt file which would be read and the content showed above the original send textarea which is now in add news section of CNR. Preferably in a dropdown box. When teh desired adress is selected it would be pasted into the send form.
hope this makes sense.. english is not my native language and I don't always write understandable...
edit: in pings.txt I want to store the pingadresses typed in... Wheter I have to make a txtfile manually and upload or if this can be done from the adminarea is the same..
_________________ My cute.ru site |
|
| Thu Sep 07, 2006 8:52 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2818 Location: Germany |
|
|
|
1. Create a file pings.txt in your data folder and put the addresses in that file - one address per line.
2. Open plugins/trackback.php and replace the function trackback_AddEdit with this:
 |  | function trackback_AddEdit(){
global $id;
echo '<script type="text/javascript">';
echo 'function insert_ping(){
item = document.getElementById(\'ping\');
dropdown = document.getElementById(\'pings\');
item.value += dropdown.value + "\n";
dropdown.options[dropdown.selectedIndex] = null;
}';
echo '</script>';
$xfields = new XfieldsData();
$echo = cute_lang('plugins/trackback');
$Data = file ('./data/pings.txt'); //Change the path as needed
$dropdown = '<select id="pings" onchange="insert_ping();" name="pings">'."\n";
$dropdown .= '<option value="">----</option>';
for ($Run = 0; isset ($Data[$Run]); $Run++) {
if (!($Line = trim ($Data[$Run]))) {
continue;
}
$dropdown .= "\t<option value=\"$Line\">".htmlentities ($Line)."</option>\n";
}
$dropdown .= '</select><br />';
$return = '<fieldset><legend>'.$echo['send'].'</legend>'.$dropdown.'<textarea id="ping" name="ping" title="'.$echo['help'].'">'.$xfields->fetch($id, 'ping').'</textarea></fieldset>'.($xfields->fetch($id, 'pinged') ? '<fieldset><legend>'.$echo['pinged'].'</legend><textarea disabled>'.replace_news('admin', $xfields->fetch($id, 'pinged')).'</textarea></fieldset>' : '');
return $return;
} |
|
|
| Fri Sep 08, 2006 12:31 am |
|
 |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
|
| Fri Sep 08, 2006 6:53 am |
|
 |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
|
|
Does someone on this forum know how the xmlrpc files are workin and how I would go about to change the HTTP Request Headers and xml-message being sent? I see som newsportals have difficulty on recieving pings from cnr, and I've also noticed that when someone tracks back my post from one of theirs, the extracts from the post are not quite working if not sent by another cnrblog. Seems there some chrash between cnr and par example wp.
And I see that if you use eg. feedburner you can have lots of stats about the subscripers to your RSSfeeds, is theis possible with cnr aswell?
_________________ My cute.ru site |
|
| Mon Sep 18, 2006 9:36 pm |
|
 |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
|
| Fri Sep 29, 2006 4:33 pm |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2818 Location: Germany |
|
|
|
I'm afraid you can't count on me. I don't understand the coding of the trackback plugin at all.
I think the only one being able to modify it is the author, lexa.
|
|
| Sat Sep 30, 2006 1:30 pm |
|
 |
Saszoo

Joined: 07 Jun 2006 Posts: 410 Location: Norway |
|
|
|
Okay... Hm so even your skills got limits
Well can't know everything, thanks for all the help you have given 
_________________ My cute.ru site |
|
| Sat Sep 30, 2006 3:14 pm |
|
 |
|