ejm
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 2.7 problems toggling between HTML/VisualThank you, mercime, I can now find the “use visual editor” option (after re-uploading the wp-includes folder – I think some of it didn’t get uploaded maybe a timeout occurred that I didn’t know about on the first uploading of wp-includes)
I will start disabling plugins one by one and report my findings…
Forum: Requests and Feedback
In reply to: 2.7 Dashboard ???I just upgraded to 2.7 from 2.0.11 (stable legacy version) and for the most part, everything went pretty well. The only thing I really miss is the look of the legacy admin area with the navigation sections across the top.
Granted, I loathe change. But is there a way that I can have my cake and eat it too? Is there a “legacy” look for the admin area in 2.7?
Forum: Fixing WordPress
In reply to: error message after activating Feedstats Plugin for WP 2.0.11Excuse me for replying to myself.
I received a reply from the author on the plugin homepage. It turns out that when the script is installed on 2.0.11, it will not create the required tables. He recommended that I create them manually, in PHPmyadmin. Just in case someone else would like to run feedstats plugin on 2.0.11, here’s what I did:
Go to SQL in PHPmyadmin and type the following:
CREATE TABLE wp_fs_data ( time_install int(11) NOT NULL DEFAULT '0', max_visits mediumint(8) UNSIGNED NOT NULL DEFAULT '0', max_visits_time int(11) NOT NULL DEFAULT '0', max_online mediumint(8) UNSIGNED NOT NULL DEFAULT '0', max_online_time int(11) NOT NULL DEFAULT '0' ) TYPE=MyISAM; CREATE TABLE wp_fs_visits ( visit_id mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, IP varchar(20) NOT NULL DEFAULT '', url varchar(255) NOT NULL DEFAULT '', time_begin int(11) NOT NULL DEFAULT '0', time_last int(11) NOT NULL DEFAULT '0', PRIMARY KEY (visit_id) ) TYPE=MyISAM;There will be a message on the wp_fs_data table saying “No index defined!” I foolishly tried to create the index from WP but got the same message “The WordPress file “upgrade-functions.php” or “upgrade.php” could not be included.”
Returning to SQL in PHPmyadmin, with a little difficulty, I created an index for wp_fs_data there using the following coding:
ALTER TABLE wp_fs_data ADD PRIMARY KEY (time_install)And it now appears that the feedstats plugin is working on WP2.0.11.
E Morris, running WinXP, Firefox 2.0.0.17, WP2.0.11
Forum: Fixing WordPress
In reply to: conditional tags and using custom fieldsThank you for your reply, Morgaine. The problem with spitting out an empty list item is that I have put a border around the unordered list. So even if the list item is empty, the border appears. This is what I have in my stylesheet:
ul.post-meta {border-top:1px dotted #ddd; border-left:3px solid #000;}What would be ideal would be for the unordered list to appear ONLY if the custom fields are filled in.
Alternatively, might there be a way of switching the class name of the unordered list from “post-meta” to “no-display” so I could remove the border for that class? (virtually hiding the empty list from view)
I hope my question made sense.
………..
It took me a while to locate “post-template.php”. It turns out that it’s because I don’t have it. (I’m running WP 2.0.11) At last I found the function the_meta() coding in wp-includes/template-functions-post.phpForum: Themes and Templates
In reply to: display custom field only if value present?Thank you for your reply, Marzar. But it does not really clarify for me how to use a conditional tag in order to surround the fields in an unordered list as described in this thread:
Forum: Themes and Templates
In reply to: display custom field only if value present?Excuse me for replying to myself. I hope I don’t get in trouble but I have started a new thread about this entitled “conditional tags and using custom fields”
Please reply at
http://wordpress.org/support/topic/138355Forum: Themes and Templates
In reply to: display custom field only if value present?I’m running wp 2.0.11 with “Get Custom Field Values 2.1” and had hoped that this thread might resolve the difficulty I am having because not every post uses the fields. I read the thread Anyone using “Get Custom Field Values” plugin in WP2.2? and also have stared many times at WP Codex: Using Custom Fields but have been unsuccessful at translating the contents. (I have only a vague understanding of PHP…)
This is the code I am currently using that does not break the page:
<?php // add custom fields if (function_exists('c2c_get_custom')) { echo '<ul class="post-meta">'; echo c2c_get_custom('Date of Publication', '<li>', '</li>'); echo c2c_get_custom('Publication', '<li class="publication"><strong>', '</strong></li>'); echo c2c_get_custom('Publication Title', '<li class="pubtitle"><strong>', '</strong></li>'); echo c2c_get_custom('Publication Author', '<li>By ', '</li>'); echo c2c_get_custom('Publication URL', '<li><small>(<a href="', ' " title="offsite link">learn more by following this link</a>)</small></li>'); echo '</ul>'; } else {echo '';} ?>Unfortunately, this does not quite achieve my expected results – if there are no custom fields filled in, then the source code shows
<ul class="post-meta"></ul>which means that the page does not validate.
After reading this thread, I tried the following:
if (is_array(c2c_get_custom($field))) { echo '<ul class="post-meta">'; echo c2c_get_custom('Date of Publication', '<li>', '</li>'); echo c2c_get_custom('Publication', '<li class="publication"><strong>', '</strong></li>'); echo c2c_get_custom('Publication Title', '<li class="pubtitle"><strong>', '</strong></li>'); echo c2c_get_custom('Publication Author', '<li>By ', '</li>'); echo c2c_get_custom('Publication URL', '<li><small>(<a href="', ' " title="offsite link">learn more by following this link</a>)</small></li>'); echo '</ul>'; } else { echo ''; }I’ve also tried opening with
if (!empty(c2c_get_custom)) {and while these do not cause error messages, they also do not display any custom fields at all.
In the css for .post-meta, there is a border, so adding an empty set of
<li></li>is not a viable option either because there will be an empty bordered section whenever the custom fields are not filled in.Any ideas on how I can fix this?
(I hope this made sense!)
-ejm
P.S. Here is a post that has the custom fields filled in: etherwork.net/blog/?p=447
and here is one that does not:
etherwork.net/blog/?p=446(Please refrain from making those URLs into live links – I’m really getting tired of spammers…)
Forum: Themes and Templates
In reply to: display custom field only if value present?Mfapsj, I’m pretty much a neophyte in php but I think your coding is closing the php prematurely.
I’m not sure that this will work but you could give it a try:
<?php $values = get_post_custom_values("Photo Gallery"); if ( is_array($values) ) { echo '<a href="' . $values[0]. '">Photo Gallery</a>'; } else { echo 'Photo Gallery'; } ?> <br />Forum: Everything else WordPress
In reply to: Spammer stills contentI just had a pingback from this site on my blog and took a look at the post on IP 74.208.16.30 (consalsita.com). I was not sure whether it was a spammer or not and googling has brought me to this post.
The title of the suspect post is exactly the same title as a post on my blog and the text written is an excerpt of my post. However, the links to that are posted directly below the suspect post title are not mine. There was also a popup that was blocked by firefox. I did NOT choose to look at whatever was there.
I believe that the reason for this site is to garner google ad revenue.
I have just reported the site to wordpress.com just in case it is a wordpress.com site. I also plan to report it to google.
edit: This is how I reported the site to google ads:
I clicked on the “Ads by Google” link that was on the suspect page. I was taken to a feedback page and clicked on the link “Send Google your thoughts on the ads you just saw” and filled out the form that appeared.
You can also use the google adsense contact form. If you use the form, Google asks that
In your message, please be sure to include:
# The URL of the violating website
# A description of the violation
# The specific location of the violation, if applicableForum: Fixing WordPress
In reply to: adding anchor tag to the_permalink()That has indeed fixed the problem. Many thanks, Otto42!
Forum: Requests and Feedback
In reply to: Resolved Threads – Please read after postingBonafide, your second thought is correct. The only people who can change the topic status from unresolved to resolved are the person who created the thread and moderators. As mentioned, the moderators are reluctant to change the status because only the person who asked the question will know whether the solution actually works.
Forum: Fixing WordPress
In reply to: custom fields in the loopExcuse me for replying to myself. I have blundered onto the solution and am posting it here, just in case someone else has similar difficulty understanding the codex. (I have no idea if the solution is the most efficient but it is working…) Here is the coding I have used:
<?php // with regards to the_meta(); add custom fields if (function_exists('c2c_get_custom')) { ?> <ul class="post-meta"> <?php echo c2c_get_custom('date', '<li>', '</li>'); echo c2c_get_custom('Publication', '<li class="publication">', '</li>'); echo c2c_get_custom('Title', '<li class="publication_title">', '</li>'); echo c2c_get_custom('Author', '<li>By ', '</li>'); echo c2c_get_custom('URL', '<li class="publication_URL">(<a href="', '">Read the complete article</a>)</li>'); ?> </ul> <?php } ?>with the following CSS
ul.post-meta {border:1px solid #000;} ul.post-meta li {padding:2px 10px; display:block;} ul.post-meta li.publication {font-weight:bold;} ul.post-meta li.publication_title {font-weight:bold; font-size:large;} ul.post-meta li.publication_URL {font-size:small;} ul.post-meta span.post-meta-key {display:none;}Of course, this will do nothing about styling any extra custom fields added on the fly but I do not anticipate adding any others.
Forum: Fixing WordPress
In reply to: EventCalendar ec3_get_events(-1) not showing all future eventsExcuse me for replying once again to myself. But others who have not yet graduated from WP2.0.10 and EC3.1.0 may be interested to hear that I have blundered onto a solution – not the most elegant, probably, but it appears to work. Instead of using [-1] in the first section of the
part in parentheses for ec3_get_events, I have switched to [‘500 days’]. At last all the future events are showing.<?php ec3_get_events('500 days',' <a href="%LINK%" title="%DATE% - %TITLE%"><b>%DATE%</b><span style="display:none">:</span> %TITLE%</a>',''); ?>Of course, I would be thrilled if someone could tell me what code to use to instruct ec3_get_events to show ALL future events.
Thank you.
—-
Running WP2.0.10, EventCalendar3.1.0, Custom Query String 2.7Forum: Fixing WordPress
In reply to: EventCalendar ec3_get_events(-1) not showing all future eventsExcuse me for replying to myself. I keep coming in here to see if someone has replied and find that the thread has been changed from “not resolved” to “this is not a support question”
I probably misworded the subject heading. Apparently this is NOT something that can be resolved by the event calendar plugin. The forumites there say it is a wordpress issue.
I am not well versed in PHP and am only guessing that it might be something I can solve with Custom Query String and/or Options – reading.
Once again, thank you for any response.
Forum: Fixing WordPress
In reply to: permalinks only work when logged inIt turns out that I had to upgrade an outdated plugin. As soon as that was done, the issue was resolved.