Custom Tables with dynamic information.

Ckesk - April 6, 2009 - 01:24
Project:Rep[lacement]Tags
Version:6.x-1.x-dev
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

First of all great mod!

However, I dont think my brain works good enough to make it do what i am wanting. Basically on my old wordpress site I used a mod called Templatedia http://wordpress.org/extend/plugins/templatedia/

This basically enabled you to created wiki style templates inside content. I used it to create custom formated "quote" forms for quoting various websites. I used it in table form.

it basically look like this

{{template name|link=link from site|poster=person being quoted|post= Content being quoted}}

I would like to make this mod do the same thing and it seems like it is possible. I would like a way to use something like

{tagname:url:poster:post} to out put a styled table or div.

If that makes sense to anyone, is it possible and if so could i get a nudge in the right direction? I dont mind working it out on my own, but I have reached a mental block and my PHP knowledge is limited.

#1

Ckesk - April 6, 2009 - 03:21

ok, i made a new inc file copying the video one. I have it all now, only it will not except multiple paragraphs of text for the $post field. here is what it looks like

<?php
// $Id: quote.tags.inc,v 1.2.2.1 2009/01/08 03:24:01 dman Exp $

/**
* @file
* Embedding custom quotes.
*/

/**
* Implimentation of _reptag_HOOK_init()
*/
function _reptag_quote_init($context) {
  return array(
     
    "#{BLUE:(.*?):(.*?):(.*?)}#e"                    => "_reptag_quote_blue('\\1', \\2, \\3);",
  
      
  );
}

function _reptag_quote_info() {
  return array(t('Quote embedding tags (Blue)'), TRUE);
}

function _reptag_quote_help() {
  return array(
      
    "{BLUE:link:poster:post}"                => "Blue quote with link, poster and post",
  
     );
}



function _reptag_quote_blue($link, $poster, $post) {
  $output = <<<EOF
    <div style="background:#424242;border:solid 2px #1b1b1b;width:640px;padding:5px;margin:auto;">
<img src="http://deathknight.info/blizz.gif">&nbsp&nbsp<a href="http://blue.mmo-champion.com/$link" target="_blank"><span style="color: white;"><strong>$poster</strong></span></a><br /><br />
<span style="color: #0099FF;"><strong>$post</strong></span>
</div>
EOF;

  return $output;
}

any ideas?

 
 

Drupal is a registered trademark of Dries Buytaert.