This was something I thought should go into Features

This was something I thought should go into Features and Suggestions, but then I lost the option to specify the plugin name, Blogs Directory. The plugin's layout uses tables, but I wanted to have the layout in columns. I converted the table tags to a combination of ul, li and div tags. Starting at line 371 of blogs-directory.php, I changed to:

$content .= '<div style="float:left; width:100%">';
			$content .= '<div border="0" border="0" cellpadding="2px" cellspacing="2px" width="100%" bgcolor="" class="blogs_directory_table">';

				//=================================//
				$avatar_default = get_option('avatar_default');
				$tic_toc = 'toc';
				//=================================//
				if ($blogs_directory['page'] == 1){
					$start = 0;
				} else {
					$math = $blogs_directory['page'] - 1;
					$math = $blogs_directory_per_page * $math;
					$start = $math;
				}

				$query = "SELECT * FROM " . $wpdb->base_prefix . "blogs WHERE spam = 0 AND deleted = 0 AND archived = '0' AND blog_id != 1";
				if ( isset( $blogs_directory_hide_blogs['private'] ) && 1 == $blogs_directory_hide_blogs['private'] ) {
					$query .= " AND public = 1";
				}
				if ( $blogs_directory_sort_by == 'alphabetically' ) {
					if ( is_subdomain_install() ) {
						$query .= " ORDER BY domain ASC";
					} else {
						$query .= " ORDER BY path ASC";
					}
				} else if ( $blogs_directory_sort_by == 'latest' ) {
					$query .= " ORDER BY blog_id DESC";
				} else {
					$query .= " ORDER BY last_updated DESC";
				}
				$query .= " LIMIT " . intval( $start ) . ", " . intval( $blogs_directory_per_page );
				$blogs = $wpdb->get_results( $query, ARRAY_A );
				$blogs = apply_filters( 'blogs_directory_blogs_list', $blogs );
				if ( count($blogs) > 0 ) {
					//=================================//
					foreach ($blogs as $blog){

                        //Hide some blogs
                        if ( blogs_directory_hide_some_blogs( $blog['blog_id'] ) )
                            continue;

						//=============================//
						$blog_title         = get_blog_option( $blog['blog_id'], 'blogname', $blog['domain'] . $blog['path'] );

						if ($tic_toc == 'toc'){
							$tic_toc = 'tic';
						} else {
							$tic_toc = 'toc';
						}
						if ($tic_toc == 'tic'){
							$bg_color = $blogs_directory_alternate_background_color;
						} else {
							$bg_color = $blogs_directory_background_color;
						}
						//=============================//
						$content .= '<ul>';
						$content .= '<li id="site-list">';
							$content .= '<a style="text-decoration:none; font-size:1.5em;" href="http://' . $blog['domain'] . $blog['path'] . '">' . $blog_title . '</a><br />';

                            //show description for blog
                            if ( 1 == $blogs_directory_show_description ) {
                                $blogdescription    = get_blog_option( $blog['blog_id'], 'blogdescription', $blog['domain'] . $blog['path'] );
                                $content .= '<div class="blogs_dir_search_blog_description" style="font-size: 12px; color: #9D88B0" >' . $blogdescription . '</div>';
                            }
							if ( function_exists('get_blog_avatar') ) {
								$content .= '<div id="ovrlay"><img src="http://lovin.ga/wp-content/uploads/2014/12/whitempty-tri-300.png" /></div><div id="avtr"><center><a href="http://' . $blog['domain'] . $blog['path'] . '">' . get_blog_avatar($blog['blog_id'], 300, $avatar_default) . '</a></center></div>';
							} else {
								$content .= '<div style="height:300px;"></div>';
							}
							$content .= '<div style="height:300px;">';

							$content .= '</li>';
						$content .= '</ul>';
					}
					//=================================//

I'm wondering if the plugin in pluggable, ie if there is a correct way to do this so I won't lose the changes on the next update?

No Responses Yet

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.