Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Trackback / xmlrpc / RSS improvement

 
Reply to topic    Forum Index » Suggestions View previous topic
View next topic
Trackback / xmlrpc / RSS improvement
Author Message
Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Trackback / xmlrpc / RSS improvement Reply with quote
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... Embarassed

_________________
My cute.ru site
Sun Aug 27, 2006 10:11 pm View user's profile Send private message Visit poster's website
Guest








Please login to hide the ads.

Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Reply with quote
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:

Code:


$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...

Code:
<?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 Shocked

_________________
My cute.ru site
Thu Sep 07, 2006 8:03 pm View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2818
Location: Germany

Post Reply with quote
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. Embarassed
Thu Sep 07, 2006 8:15 pm View user's profile Send private message
Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Reply with quote
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 View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2818
Location: Germany

Post Reply with quote
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:

Code:
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 View user's profile Send private message
Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Reply with quote
Thank you so much Very Happy Very Happy

perfect!

_________________
My cute.ru site
Fri Sep 08, 2006 6:53 am View user's profile Send private message Visit poster's website
Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Reply with quote
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 View user's profile Send private message Visit poster's website
Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Reply with quote
Hm I read that

xml-rpc pings needs to be adjusted to show excerpts and stuff. I think that might be the case with cnr aswell becasue when I recieve pings or ping other sites there is no excerpt. Also I've found out some portals don't accept xml-rpc only pingbacks or something...

So what I think would be good was to ahve both options... I've tried hard, I really have, put I just don't get these things, but if someone skilled *cough*FI-DD*cough* could take one look into it that would be great! Very Happy

some links I've found:

http://cutephp.com/forum/index.php?showtopic=14642&hl=

http://www.intertwingly.net/blog/864.html

http://technorati.com/developers/ping/

_________________
My cute.ru site
Fri Sep 29, 2006 4:33 pm View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2818
Location: Germany

Post Reply with quote
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 View user's profile Send private message
Saszoo



Joined: 07 Jun 2006
Posts: 410
Location: Norway

Post Reply with quote
Okay... Hm so even your skills got limits Wink

Well can't know everything, thanks for all the help you have given Very Happy

_________________
My cute.ru site
Sat Sep 30, 2006 3:14 pm View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    Forum Index » Suggestions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
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
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.