Browse Source

Minor fixes

pecesama 15 years ago
parent
commit
3bfc42a5eb
3 changed files with 15 additions and 25 deletions
  1. 0 15
      plugins/hola.php
  2. 14 9
      plugins/kodrs.php
  3. 1 1
      update.php

+ 0 - 15
plugins/hola.php View File

@@ -1,15 +0,0 @@
1
-<?php
2
-
3
-class hola extends plugins {
4
-	
5
-	function hola() {
6
-		//$this->addAction('gelato_init', 'saluda');		
7
-	}
8
-	
9
-	function saluda() {
10
-		echo "Hola mundo desde plugin en gelato<br />";
11
-	}
12
-	
13
-}
14
-
15
-?>

+ 14 - 9
plugins/kodrs.php View File

@@ -1,12 +1,5 @@
1 1
 <?php
2
-/*
3
-Plugin Name: kodrs
4
-Plugin URI: http://plugins.gelatocms.com/kodrs/
5
-Description: Geshify your source codes
6
-Author: Pedro Santana
7
-Author URI: http://www.pecesama.net/
8
-Version: 0.1
9
-*/ 
2
+
10 3
 class kodrs extends plugins {	
11 4
 	
12 5
 	function kodrs() {
@@ -15,12 +8,24 @@ class kodrs extends plugins {
15 8
 		}
16 9
 		$this->addAction('post_content', 'source_code_beautifier');
17 10
 	}
11
+	
12
+	function info()
13
+	{
14
+		return array(
15
+			'name' => 'kodrs',
16
+			'version' => '0.1',
17
+			'url' => 'http://plugins.gelatocms.com/kodrs/',
18
+			'author' => 'Pedro Santana',
19
+			'authorurl' => 'http://www.pecesama.net/',
20
+			'license' => 'MIT License',
21
+			'description' => 'Geshify your source codes',
22
+		);
23
+	}
18 24
 
19 25
 	function source_code_beautifier() {
20 26
 		global $rows;
21 27
 		if(count($rows)>0){
22 28
 			foreach($rows as $key=>$post){
23
-				// Si no es tipo 'post' entonces no tiene 'Body' :)
24 29
 				if($post["postType"]=="post"){
25 30
 					$text = $rows[$key]['Body'];		
26 31
 					$result = preg_replace_callback("/<code\s+.*lang\s*=\"(.*)\">(.*)<\/code>/siU", 

+ 1 - 1
update.php View File

@@ -16,7 +16,7 @@ if(!defined('entry')) define('entry',true);
16 16
 require('entry.php');
17 17
 global $configFile, $db;
18 18
 
19
-if (!file_exists($configFile) || true) {
19
+if (!file_exists($configFile) == true) {
20 20
 	$mensaje = '
21 21
 			<h3 class="importan">'.__("Error reading configuration file").'</h3>
22 22
 			<p>'.__("There does not seem to be a <code>config.php</code> file. I need this before we can get started.").'</p>