nmallory
Forum Replies Created
-
Forum: Plugins
In reply to: WordPress Email Notification Plugin v2.3.1There is an issue in email_notification_2.3.1.php with the way the date is handled which is why there is a delay in when the email notification is sent out. Here is how I fixed it.
I replaced:
$curr_date = date(“YmdHi”);
$date_diff = $curr_date – $post_date;With:
$post_dat2 = $postdata[‘Date’];And replaced:
if ($date_diff < 0){with:
if ($post_dat2 > current_time(‘mysql’)) {This appears to have resolved my issue.
Forum: Plugins
In reply to: different class/styles on index page regarding to categoriesor you could use in_category() if you aren’t using the adhesive plugin:
<?php while (have_posts()) : the_post(); ?>
<?php if in_category(7) : ?>
<div class=”postcat7″>
<?php else : ?>
<div class=”post”>
<? endeif; ?>
Forum: Plugins
In reply to: Adsense – Deluxe Plugin ?OK I had real problems getting this plugin to work. Here’s a couple of things I learned; I hope they help.
1. I had to make sure that every box was checkmarked or filled in.
2. I couldn’t use the<!--adsense-->format. I ended up having to use the php call.
3. Note it is sensetive to whether or not you use a capital letter or not.
4. I had to put it in the templates.
5. When using the php call, you have to use only the ad name, not what would have gone in the comment format.
6. For example, my defalt adsense block has the ad name of “SmallBanner” so in the template, I put<?php adsense_deluxe_ads('SmallBanner'); ?>rather than<!--adsense-->. (I don’t think the documentation was clear on that.I still think it’s kind of fudgy. Sometimes even though the code is in the page source, my ads don’t appear to the user.
Forum: Plugins
In reply to: BAStats & Reporting PedophilesI really shouldn’t type without spell check before I’ve had my coffee.
Forum: Plugins
In reply to: BAStats & Reporting PedophilesHmmm… no. I wonder if there’s a way to block Google from coming to my site on certain search strings. That way I just wouldn’t have to know about the sickos in the world and I could go back to my safe little world where I just worry about women’t rights and the war in afghanistan and George Bush and not worry about child predetors at all.
Forum: Plugins
In reply to: BAStats & Reporting PedophilesI’m sorry but why else would you be searching for “naked 10 year old girls” on google? Please give me one good comforting valid excuse.
Forum: Plugins
In reply to: Plugin to Upload Plugins?Now if I could just find a plugin that would bring people who actually leave intelligent discussion-type comments to my site. 😉
Or helps me lose 10lbs a week.
😛
Forum: Plugins
In reply to: Plugin to Upload Plugins?teehee
in fact, I need one that will fetch my SF vanilla soy latte from Starbucks while he’s having a smoke and everything is installing…
Forum: Plugins
In reply to: Plugin to Upload Plugins?thanks for the link. I’m testing it now. The problem I’m running into, of course, is that not all plugins are zipped up the way the installer expects. I’ve ended up having to FTP in anyway to sort out the directories.
It’d be nice to be able to do a file creation kind of thing where I create an empty file and type in new code or cut and paste from another source and save into the plugin directory.
I know. I just want everything. I hate users like that.
Forum: Plugins
In reply to: Linknotes and WordPress 2I decided to take it out. It really appears to only be a problem with posts written after the conversion to WP2.
Forum: Plugins
In reply to: Linknotes and WordPress 2Hi, me again.
I’ve narrowed it down, I think. I’m having trouble interpretting this line:
$text = preg_replace_callback('/
:" # start
([^"]+)? # $desc
s?
(?:(([^)]+))(?="))? # $title
":
(S+b)? # $url
(/)? # $slash
([^w/;]*) # $post
(?=s|$)
/Ux', array(&$this, "linkd"), $text);The rest of the function is:
if ($this->are_links) {
for ($i=1; $i <= $this->count; $i++) {
$links .= $this->items[$i];
}$linknotes = str_replace('%items%', $links, $this->notes_code);
$text = $text.$linknotes;
}return $text;
}If you want to know what the linkd function is:
` function linkd($m) {
list(, $title, $text, $url, $slash, $post) = $m;
$this->count++;
$this->are_links = true;$itm_replace = array(‘%noted-id%’, ‘%url%’,’%title%’,’%desc%’, ‘%desc_text%’, ‘%return%’);
$desc = $text;
if ($text && $url) $desc = str_replace(‘%desc_text%’, $text, $this->desc_code);$itm = array( “linknote-$this->id-$this->count”, $url, $title, $desc, $text, “#noted-$this->id-$this->count”);
$this->items[$this->count] = str_replace($itm_replace, $itm, $this->item_code);
$at_title = strip_tags($title.$desc);
return “<sup>id.’-‘.$this->count.”‘;\” id=\”noted-$this->id-$this->count\” title=\”$at_title\”>[$this->count]</sup>”;
}’I can’t see why it would strip the html tags or displace them.
Forum: Fixing WordPress
In reply to: Why does the search function for Support forums suck so badly?I too have not had much success following the instructions to go to google and use “wordpress.org/support” and my topic. The search function on the site used to work well. I don’t know why the search box is even on the site as it is just a mean taunt.
Forum: Fixing WordPress
In reply to: WordPress 2.0.1 & Email Notification Plugin v2.3.1I’ve had to hack this plugin because A.) I use 3 blogs on 1 MySQL DB each with it’s own db tag and B.) it was marking all posts as future posts and then only sending when it got saved again.
I reported it, but never heard from the plugin writer. It is not compatible with WordPress 2.0 in my opinion as I only had problems once I upgraded both.
Forum: Plugins
In reply to: Plugin Wanted: Dropdown Cat List for LinksIn case anyone is interested, I used a script from Dynamic Drive:
This I put in the header:
<style type="text/css">
.menutitle{
cursor:pointer;
margin-left: 5px;}
.submenu{
margin-bottom: 0.5em;
}
</style><script type="text/javascript">
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page onlyif (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">n')
document.write('.submenu{display: none;}n')
document.write('</style>n')
}function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display="block"
}
}function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunctionif (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate</script>
This I put in the sidebar:
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">
<?php $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories ORDER BY cat_name");
foreach ($link_cats as $link_cat) { ?>
<div class="menutitle" onclick="SwitchMenu('sub<?php echo $link_cat->cat_id; ?>')"><h2><?php echo $link_cat->cat_name; ?></h2></div>
<span class="submenu" id="sub<?php echo $link_cat->cat_id; ?>">
<ul>
<?php wp_get_links($link_cat->cat_id); ?>
</ul></span>
<?php } ?>
</div>You can see the result at: The Naked Truth
Forum: Themes and Templates
In reply to: in_category not working on front pageIn case anyone cares, it appears that Adhesive plugin disables in_category().