t_clauss
Forum Replies Created
-
Forum: Installing WordPress
In reply to: [Plugin: TDO Mini Forms] error 500 with a custom pluginI will also not that if i remove this from my plugin everything works fine, I’m just confused now as I did have it working fine b4 no problems.
function Wp_gwbbcode($text) { $text = parse_gwbbcode($text); return $text; } add_filter('the_content', 'Wp_gwbbcode');
I am also using a modified i3theme. Which works w/o my plugin activated or those few lines.
Forum: Plugins
In reply to: Custom plugin helpOk, I feel pretty dumb I’ve worked out the new post/page bug, I had too many <?php, and ?> tags.
Forum: Plugins
In reply to: Custom plugin helpHere are some options id like to add:
– Adding the “if !defined, define, and require_once, to the plugin itself instead of adding lines to index.php
– A option in the admin menu to tell wordpress where gwbbcode is installed
– Option for parsing in comments
– Option to hide gwbbcode from unregistered users, so they see nothing instead of [yourgwbbcode]And finially, working out the new post/page bug from the dashboard. (it does create them, just doesnt publish right away. Instead gives you an error.)
More info on gwbbcode can be found here:
https://gwshack.us/forums/viewtopic.php?t=14242Forum: Plugins
In reply to: Any new plugin requests?Perhaps u could lend me a hand with this?
Forum: Plugins
In reply to: Custom plugin helpI think whats happening is when im writing a new post/page its trying to parse, is there a way to exclude it from doing this when writing content. Its weird because u can edit a post/page properly after its made. Just the initial creation says it failed.
I have this located in index.php in the wp directory
<?php if (!defined('GWBBCODE_ROOT')) { define('GWBBCODE_ROOT', './gwbbcode'); require_once(GWBBCODE_ROOT.'/gwbbcode.inc.php'); }?>
How would I go about putting that code into my plugin itself? BTW gwbbcode is in the base directory of wordpress.
Forum: Plugins
In reply to: I’m begging for a simple plugin…I tell ya what I am using TDO Mini Forms, to create a build directory. Basically i have made a form for members to submit data to a post. I have created a custom field called Build Code, that is where members use their gwbbcodes. In the form of [Eviscerate Paladin;OQMT00IK5xwyXRcSlqyPxfASAA] (this is just cut and pasted out of the game).
TDO Mini forms come with a form hacker, this is my form
<!-- Form 1 start --> %%FORMMESSAGE%% <!-- form start --> <form method="post" action="https://guildevil.byteact.com/wp-content/plugins/tdo-mini-forms/tdomf-form-post.php" id='tdomf_form1' name='tdomf_form1' class='tdomf_form' > %%FORMKEY%% <input type='hidden' id='tdomf_form_id' name='tdomf_form_id' value='1' /> <input type='hidden' id='redirect' name='redirect' value='%%FORMURL%%' /> <!-- widgets start --> <!-- content start --> <fieldset> <label for="content_title" class="required">Post Title (Required): <input type="textfield" name="content_title" id="content_title" size="23" value="<?php echo htmlentities($content_title,ENT_QUOTES,get_bloginfo('charset')); ?>" /> </label> </fieldset> <!-- content end --> <!-- customfields-1 start --> <fieldset> <?php $value = ""; if(isset($post_args['customfields-textfield-1'])) { $value = $post_args['customfields-textfield-1']; } ?> <label for="customfields-textfield-1" class="required">Build Code (Required) <input type="textfield" name="customfields-textfield-1" id="customfields-textfield-1" size="23" value="<?php echo htmlentities($value,ENT_QUOTES,get_bloginfo('charset')); ?>" /> </label> </fieldset> <!-- customfields-1 end --> <!-- customfields-2 start --> <fieldset> <?php $value = ""; if(isset($post_args['customfields-textarea-2'])) { $value = $post_args['customfields-textarea-2']; } ?> <label for="customfields-textarea-2">Description </label> <textarea title="true" rows="5" cols="19" name="customfields-textarea-2" id="customfields-textarea-2" ><?php echo htmlentities($value,ENT_NOQUOTES,get_bloginfo('charset')); ?></textarea> </fieldset> <!-- customfields-2 end --> <!-- categories start --> <fieldset> <?php $defcat = 1; if(isset($post_args['categories'])) { $defcat = $post_args['categories']; } ?> <label for='categories'>Select a category: <select name='categories' id='categories' class='tdomf_categories' size='1' > <option value="3"<?php if( (is_array($defcat) && in_array(3, $defcat)) || ( 3 == $defcat ) ) { echo ' selected="selected" '; } ?> >Warrior</option> <option value="4"<?php if( (is_array($defcat) && in_array(4, $defcat)) || ( 4 == $defcat ) ) { echo ' selected="selected" '; } ?> >Monk</option> <option value="5"<?php if( (is_array($defcat) && in_array(5, $defcat)) || ( 5 == $defcat ) ) { echo ' selected="selected" '; } ?> >Necromancer</option> <option value="6"<?php if( (is_array($defcat) && in_array(6, $defcat)) || ( 6 == $defcat ) ) { echo ' selected="selected" '; } ?> >Mesmer</option> <option value="7"<?php if( (is_array($defcat) && in_array(7, $defcat)) || ( 7 == $defcat ) ) { echo ' selected="selected" '; } ?> >Elementalist</option> <option value="8"<?php if( (is_array($defcat) && in_array(8, $defcat)) || ( 8 == $defcat ) ) { echo ' selected="selected" '; } ?> >Ranger</option> <option value="9"<?php if( (is_array($defcat) && in_array(9, $defcat)) || ( 9 == $defcat ) ) { echo ' selected="selected" '; } ?> >Assassin</option> <option value="10"<?php if( (is_array($defcat) && in_array(10, $defcat)) || ( 10 == $defcat ) ) { echo ' selected="selected" '; } ?> >Ritualist</option> <option value="11"<?php if( (is_array($defcat) && in_array(11, $defcat)) || ( 11 == $defcat ) ) { echo ' selected="selected" '; } ?> >Dervish</option> <option value="12"<?php if( (is_array($defcat) && in_array(12, $defcat)) || ( 12 == $defcat ) ) { echo ' selected="selected" '; } ?> >Paragon</option> </select> </label> </fieldset> <!-- categories end --> <!-- widgets end --> <!-- form buttons start --> <table border='0' align='left'><tr> <td width="10px"><input type="submit" value="Preview" name="tdomf_form1_preview" id="tdomf_form1_preview" onclick="tdomfSubmit1('preview'); return false;" /></td> <td width="10px"><input type="submit" value="Send" name="tdomf_form1_send" id="tdomf_form1_send" onclick="tdomfSubmit1('post'); return false;" /></td> </tr></table> <!-- form buttons end --> </form> <!-- form end --> <!-- Form 1 end -->
So could i change
<label for="customfields-textfield-1" class="required">Build Code (Required) <input type="textfield" name="customfields-textfield-1" id="customfields-textfield-1" size="23" value="<?php echo htmlentities($value,ENT_QUOTES,get_bloginfo('charset')); ?>" /> </label>
To
<label for="customfields-textfield-1" class="required">Build Code (Required) <input type="textfield" name="customfields-textfield-1" id="customfields-textfield-1" size="23" value="<?php echo gwbbcode_parse($value,ENT_QUOTES,get_bloginfo('charset')); ?>" /> </label>
If that would work, my problem would still be that if somone went to edit their post they would lose the gwbbcode, and by using the Exec PHP id have to assign them rights to post php, and they would have to use php syntax, which everyone doesnt know, Including me.
Isnt there just a simple way to make a filter or something for [anytext] That way users could not only use gwbbcode in the form that i made, but in posts/pages everywhere, and WordPress wont mess it up.
If I could just find a really really nice person, that is proficient with php, that could say here. This is how u check for [any text] in your content, and this is how u call an external app to use it.
Forum: Plugins
In reply to: I’m begging for a simple plugin…I am aware of the plugin that u can get to use with Exec PHP to allow other users then admin to post php code. However It would be easier for my members if they didnt have to use the php code syntax.
So by making a filter, for the hook gwbbcode_parse to allow gwbbcode to parse everything between [, and ] would be much easier. I just dont know how to go about doing it. As I am no php programmer.
I am prolly not making any sence because i have no clue about php. I am trying my best to learn. I’ve been reading about making plugins but i just get lost when they start to say things like hooks, actions, and what not.
All that I know is that for gwbbcode to work u need is to include a file from gwbbcode, then tell it what to parse. By using gwbbcode_parse
I would also imagine that it would have to check if [some text is being used] then tell gwbbcode_parse to do its thing.
Forum: Plugins
In reply to: I’m begging for a simple plugin…Well if i dont do the constant bumping, my topic just gets lost in this forum. At least im actually attempting to write a plugin to do this. Thx for the tips and support on the matter reguardless.
Forum: Plugins
In reply to: I’m begging for a simple plugin…GAH!!!!!
Look at my avatar im pulling out my hair!
Forum: Plugins
In reply to: I’m begging for a simple plugin…Of course changing the Wp_UCanHide to Wp_gwbbcode, and instead of hiding the text between [hide] [/hide] lets gwbbcode_parse text between [, and ] .
Is that possible, i mean i know we will have to
define('GWBBCODE_ROOT', 'full_path_to/gwbbcode'); require_once(GWBBCODE_ROOT.'/gwbbcode.inc.php');
Please help me b4 i break my server… 8-(
PLEASE HELP ME IM NO GOOD AT CODING, I HAVE NO IDEA WHAT IM DOING ACTUALLY….
Forum: Plugins
In reply to: I’m begging for a simple plugin…Iv’e managed to find this I’m think maybe with a little tweeking we can get it to work for gwbbcode.
function Wp_UCanHide($text) { global $user_ID; if ($user_ID == '') { $posdebut = strpos($text, '[hide]'); $posfin = strpos($text, '[/hide]'); $texttohide = substr($text,$posdebut,$posfin); $text = str_replace($texttohide, "", $text); return $text; }else{ $text = str_replace('[hide]', "", $text); $text = str_replace('[/hide]', "", $text); return $text; } } // Apply the filters, to get things going add_filter('the_content', 'Wp_UCanHide'); ?>
Forum: Plugins
In reply to: I’m begging for a simple plugin…So any thoughts on how to get parse_gwbbcode to parse when somone uses brackets [this is what gwbbcode parses] in content?
The phpexe plugin will not work for me as only admins can post php code into content.
Would be much easier to make a plugin that shows wordpress where gwbbcode is on the server, and then lets gwbbcode parse_gwbbcode when [ ]’s are used in content.
I am very persistant , and I will be here all day.. ??
Forum: Plugins
In reply to: I’m begging for a simple plugin…WoW Support ROX!
Plz any help for making a simple plugin for anytime i use [sometext] it will parse what between the [brackets]
the software (gwbbcode) does all the work i just need a way to plug it into wordpress >.>
<?php if (!defined('GWBBCODE_ROOT')) { define('GWBBCODE_ROOT', 'full_path_to/gwbbcode'); require_once(GWBBCODE_ROOT.'/gwbbcode.inc.php'); } echo parse_gwbbcode("blabla [build prof=Mo][Word of Healing][/build]"); ?>
Maybe I can try to take some php lessons, but ill tell ya i tend to break things!
Forum: Plugins
In reply to: I’m begging for a simple plugin…Here is a plugin for joomla can we convert this?
`<?php
/**
* @version $Id: gwBBCode.php 2999 2007-02-16 21:45:00Z $
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL
*/// no direct access
defined( ‘_VALID_MOS’ ) or die( ‘Restricted access’ );$_MAMBOTS->registerFunction( ‘onPrepareContent’, ‘botgwBBCode’ );
/**
* gwBBCode Mambot
*
*{moscode}...some code...{/moscode}
*/
function botgwBBCode( $published, &$row, &$params, $page=0 ) {
//define(‘SMF’, 1);
require_once( $GLOBALS[‘mosConfig_absolute_path’] . ‘/gwbbcode/gwbbcode.php’ );
// simple performance check to determine whether bot should process further
if ( strpos( $row->text, ‘[‘ ) === false ) {
return true;
}// perform the replacement
$row->text = parse_gwbbcode( $row->text );return true;
}
?>`