moserious SEO rap movie 101
Moserious made this creative rap movie covering the basics of SEO/paid search.
Well done !
Popularity: 4% [?]
capture the encoding from the main XML file tag
To capture the encoding from the XML tag of the file. We need to read the first line, and pass it to the function to capture the encoding value.
The first line looks like this:
< ?xml version="1.0" encoding="utf-8"? >
The PHP code:
PHP:
function readfirstline($file){ return $firstline; } function get_attr( $line ,$attr) { return $arr_enc [1]; } $path = "home/user/feeds/id.xml"; $line= readfirstline($path);
Popularity: 4% [?]
hot or not wordpress plugin
This wordpress plugins adds a radio button to the comment form so users can tell if a post is hot or not. Depending on the value that is chosen, another css class is added to comment .
- Download the plugin
- Adding the radionbutton group to the comment form.
-
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
- Dynamically add the class to the comment
-
<?php foreach ($comments as $comment) ?>
-
li id="comment-<?php comment_ID() ?>" class="<?php print $comment->css ?>">
- Activate the plugin
- Change the css style of your comments
Download the Hot Or Not plugin here
Unzip this file into the /wp- content/plugins/ folder.
This radiobutton has to be added in the < form > tag of the comments. You can find this somewere at the bottom of your "template/comments.php" file. It looks something like this.
HTML:
You have to paste the code below in that form.
In the beginning of that same file, there is a php foreach statement to print all comments.
HTML:
A bit further in the file you have to add the hotornot class to the listitem:
HTML:
Active the plugin in the admin "Plugins" screen in wordpress.
You can do this in the template/style.css file.
.vote_hot {style.css (line 692)
background-color:#CDEEAB;
border-top:1px dotted #006600;
color:#006600;
}.vote_not {style.css (line 699)
background-color:#FFE0E0;
border-top:1px dotted #F5857E;
color:#AB0000;
}
Popularity: 28% [?]


