Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1775

PostPosted: Fri Nov 27, 2009 12:01 pm Reply with quote

hey!

i have in many themes the same problem, if i use big sized topic-images. the topic-images are listed in the admin-section side by side and then the theme distorts.

in the file modules/topics/admin/index.php is the function topicsmanager. in this function is a echo call before start the content of the <td>. does this make sense or how can make it clean?

Code:


if ($count==0) echo '<tr>'; // HERE!!
echo '<td align="center">'
         .'<a href="'.$admin_file.'.php?op=topicedit&amp;topicid='.$topicid.'"><img src="'.$tipath.$topicimage.'" border="0" alt="" /></a><br />'

         .'<span class="content"><b>'.$topictext.'</b></span></td>';
   
         $count++;
         if ($count == 5) {
            echo '</tr>';
            $count = 0;
         }
      }
      if ($count > 0) {
         echo '</tr>';
      }
      echo '</table>';


if i moved the first <tr> to the next echo call, then i become all topic-images together listed. is not the best way but one topic always it exists after a fresh install.

Code:


if ($count==0) echo ''; // MOVED
echo '<tr><td align="center">' // HERE
         .'<a href="'.$admin_file.'.php?op=topicedit&amp;topicid='.$topicid.'"><img src="'.$tipath.$topicimage.'" border="0" alt="" /></a><br />'

         .'<span class="content"><b>'.$topictext.'</b></span></td>';
   
         $count++;
         if ($count == 5) {
            echo '</tr>';
            $count = 0;
         }
      }
      if ($count > 0) {
         echo '</tr>';
      }
      echo '</table>';
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Nov 27, 2009 1:36 pm Reply with quote

neralex, the code that is in the distribution is correct and XHTML/HTML compliant. If you were to run your generated HTML through a validator, you would find that it is not valid. The code is written, on purpose, to show topics/images in two columns, hence the use of a two-column table layout. If you want to just show everything in one list, I would just take out all the table related tags, and either put each topic within <p></p> tags or after each one, use maybe two <br /> tags.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Mon Nov 30, 2009 9:57 am Reply with quote

Yeah. a time ago I wondered also about this strange behavior but I had no issue with the default theme.
http://www.ravenphpscripts.com/posts18084-highlight-.html
 
View user's profile Send private message
neralex







PostPosted: Mon Nov 30, 2009 4:55 pm Reply with quote

montego: try it self ... <p> & <br /> works not here to solve this issue! if you have one topic in your DB its all valid! i found no errors! if you don' t have a topic or you have all topics deteled, give it a chance for failure. but who has no topics and use the news-module? oO

Susann: ich bin bald bekloppt geworden, weil ich diese ganze Tabelle zerpflückt hatte, nur um den Fehler bzw. diese winzige Veränderung zu finden. Letztlich führt sie bei mir endlich zum Ziel und sofern man ein Topic hat, ist es auch valide.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
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 can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©