Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2009, 08:15 PM
gabeki gabeki is offline
Premium Member
 
Join Date: Oct 2009
Posts: 24
Gender: Female
Credits: 1,293
gabeki
Default HTML instead of BBCodes (Answered)

Hi. How can I use HTML in the page content editor of admin's section on my site?

The owner once told me I should edit some code to permit that, but he told me on Myadopts forum, that got reset, so I can't find it.

Thanks from now.
__________________
My Pets site: MaplePet (Released: No)
Done: Stats system, Adoptables Sex system, Battle and using pokeballs like items to capture pets, stats (luck and dexterity) affecting the chance of capturing, Element system (8 elements), Trading, shopping, inventory system, Pet profile for each pet.
Working: Battle System againsts monsters found in the Map
Reply With Quote
  #2  
Old 10-09-2009, 09:26 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,711
BMR777 is on a distinguished road
Default RE: HTML instead of BBCodes

In admpost.php find all:

PHP Code:
$content secure($content); 
Replace with:

PHP Code:
$content mysql_real_escape_string($content); 
Replacing all of those will allow you to use HTML and BBCode. :)
Reply With Quote
  #3  
Old 10-09-2009, 09:45 PM
gabeki gabeki is offline
Premium Member
 
Join Date: Oct 2009
Posts: 24
Gender: Female
Credits: 1,293
gabeki
Default RE: HTML instead of BBCodes

I did that, but I think something went wrong :(

The html codes just appear and have no effect...

http://maplepet.co.cc/pages.php?page=maplepets
__________________
My Pets site: MaplePet (Released: No)
Done: Stats system, Adoptables Sex system, Battle and using pokeballs like items to capture pets, stats (luck and dexterity) affecting the chance of capturing, Element system (8 elements), Trading, shopping, inventory system, Pet profile for each pet.
Working: Battle System againsts monsters found in the Map
Reply With Quote
  #4  
Old 10-09-2009, 10:04 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,711
BMR777 is on a distinguished road
Default RE: HTML instead of BBCodes

In pages.php try removing the following line and see if it helps:

PHP Code:
$article_content nl2br($article_content); 
Reply With Quote
  #5  
Old 10-09-2009, 10:08 PM
gabeki gabeki is offline
Premium Member
 
Join Date: Oct 2009
Posts: 24
Gender: Female
Credits: 1,293
gabeki
Default RE: HTML instead of BBCodes

I removed

PHP Code:
$article_content nl2br($article_content); 
and

PHP Code:
$article_content bbconvert($article_content); 
from: pages.php

and it worked!

Thanks :D

ps: I guess now I can't use BBCodes, but that's ok.. :P
__________________
My Pets site: MaplePet (Released: No)
Done: Stats system, Adoptables Sex system, Battle and using pokeballs like items to capture pets, stats (luck and dexterity) affecting the chance of capturing, Element system (8 elements), Trading, shopping, inventory system, Pet profile for each pet.
Working: Battle System againsts monsters found in the Map
Reply With Quote
  #6  
Old 10-10-2009, 09:55 AM
gabeki gabeki is offline
Premium Member
 
Join Date: Oct 2009
Posts: 24
Gender: Female
Credits: 1,293
gabeki
Default RE: HTML instead of BBCodes (Answered)

Sorry for the double post...

Is there anyway I can use PHP too with html? '-'
__________________
My Pets site: MaplePet (Released: No)
Done: Stats system, Adoptables Sex system, Battle and using pokeballs like items to capture pets, stats (luck and dexterity) affecting the chance of capturing, Element system (8 elements), Trading, shopping, inventory system, Pet profile for each pet.
Working: Battle System againsts monsters found in the Map
Reply With Quote
  #7  
Old 10-10-2009, 04:09 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,711
BMR777 is on a distinguished road
Default RE: HTML instead of BBCodes (Answered)

No, there's no way to use PHP code directly in the editor window. Sorry.
Reply With Quote
  #8  
Old 10-10-2009, 05:27 PM
gabeki gabeki is offline
Premium Member
 
Join Date: Oct 2009
Posts: 24
Gender: Female
Credits: 1,293
gabeki
Default RE: HTML instead of BBCodes (Answered)

Ok.. let me ask one more thing '-'

I'm using something like that (in the index.php file)...

PHP Code:
$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content = include("news/show_news.php"); 
to show a news system.. and that kinda works, but the page is included not where is the :ARTICLECONTENT: on the template...

look http://maplepet.co.cc/index.php

the news are up there, and not where it's supposed to be '-'

do you know how can I solve that?
__________________
My Pets site: MaplePet (Released: No)
Done: Stats system, Adoptables Sex system, Battle and using pokeballs like items to capture pets, stats (luck and dexterity) affecting the chance of capturing, Element system (8 elements), Trading, shopping, inventory system, Pet profile for each pet.
Working: Battle System againsts monsters found in the Map
Reply With Quote
  #9  
Old 10-10-2009, 05:35 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,711
BMR777 is on a distinguished road
Default RE: HTML instead of BBCodes (Answered)

Where is the news appearing now, where it says "Cutenews"?

What is the code for the show_news.php file?
Reply With Quote
  #10  
Old 10-10-2009, 05:45 PM
gabeki gabeki is offline
Premium Member
 
Join Date: Oct 2009
Posts: 24
Gender: Female
Credits: 1,293
gabeki
Default RE: HTML instead of BBCodes (Answered)

yes, the news are appearing up there, where it says 'CuteNews', and before any tags...

here's the complete code of show_news

PHP Code:
<?PHP

error_reporting 
(E_ALL E_NOTICE);

$cutepath =  __FILE__;
$cutepath preg_replace"'\\\show_news\.php'"""$cutepath);
$cutepath preg_replace"'/show_news\.php'"""$cutepath);

require_once(
"$cutepath/inc/functions.inc.php");
require_once(
"$cutepath/data/config.php");

// If we are showing RSS, include some need variables.
if($template == 'rss'){
   include(
"$cutepath/data/rss_config.php");
}

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($_SERVER["HTTP_ACCEPT"] or $_SERVER["HTTP_ACCEPT_CHARSET"] or $_SERVER["HTTP_ACCEPT_ENCODING"] or $_SERVER["HTTP_CONNECTION"]){ /* do nothing */ }
elseif(
eregi("show_news.php"$PHP_SELF)){
die(
"<h4>CuteNews has detected that you are including show_news.php using the URL to this file.<br>
This is incorrect and you must include it using the PATH to show_news.php</h4><br>Example:<br>
this is <font color=red>WRONG</font> :&nbsp;&nbsp; &lt;?PHP include(\"http://yoursite.com/cutenews/show_news.php\"); ?&gt;<br>
this is <font color=green>CORRECT</font>:&nbsp;&nbsp; &lt;?PHP include(\"cutenews/show_news.php\"); ?&gt;<br>
<br><BR>// <font size=2>if you think this message shouldn't be shown, open show_news.php and delete it from there</font>"
);
}
//----------------------------------
// End of the check
//----------------------------------

if(!isset($subaction) or $subaction == ""){ $subaction $POST["subaction"]; }

if(!isset(
$template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/Default.tpl"); }
else{
        if(
file_exists("$cutepath/data/${template}.tpl")){ require("$cutepath/data/${template}.tpl"); }
    else{ die(
"Error!<br>the template <b>".htmlspecialchars($template)."</b> does not exists, note that templates are case sensetive and you must write the name exactly as it is"); }
}

// Prepare requested categories
if(eregi("[a-z]"$category)){
        die(
"<b>Error</b>!<br>CuteNews has detected that you use \$category = \"".htmlspecialchars($category)."\"; but you can call the categories only with their <b>ID</b> numbers and not with names<br>
    example:<br><blockquote>&lt;?PHP<br>\$category = \"1\";<br>include(\"path/to/show_news.php\");<br>?&gt;</blockquote>"
);
}
$category preg_replace("/ /"""$category);
$tmp_cats_arr explode(","$category);
foreach(
$tmp_cats_arr as $key=>$value){
    if(
$value != ""){ $requested_cats[$value] = TRUE; }
}

if(
$archive == ""){
        
$news_file "$cutepath/data/news.txt";
        
$comm_file "$cutepath/data/comments.txt";
}else{
        
$news_file "$cutepath/data/archives/$archive.news.arch";
        
$comm_file "$cutepath/data/archives/$archive.comments.arch";
}

$allow_add_comment                        FALSE;
$allow_full_story                        FALSE;
$allow_active_news                         FALSE;
$allow_comments                         FALSE;



//<<<------------ Detarime what user want to do
if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or ($requested_cats[$ucat] == TRUE )  ) ){
    if(
$subaction == "addcomment"){  $allow_add_comment        TRUE$allow_comments TRUE; }
    if(
$subaction == "showcomments"){ $allow_comments TRUE; }
    if((
$subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes"){$allow_full_story TRUE; }
    if(
$subaction == "showfull"$allow_full_story TRUE;
    if(
$subaction == "showfull" and $config_show_comments_with_full == "yes"$allow_comments TRUE;

}
else{
    if(
$config_reverse_active == "yes"){ $reverse TRUE; }
        
$allow_active_news TRUE;
}
//----------->>> Detarime what user want to do

require("$cutepath/inc/shows.inc.php");
    if(
$_GET['archive'] and $_GET['archive'] != ''){ $archive $_GET['archive']; } // stupid fix ?
unset($static$template$requested_cats$category$catid$cat,$reverse$in_use$archives_arr$number$no_prev$no_next$i$showed$prev$used_archives);
?>
<!-- News Powered by CuteNews: http://cutephp.com/ -->
(I don't understand this at all :()

but I think the problem isn't at 'show_news', cause even if I do that:

PHP Code:
function content1() {
    echo 
"testing content location";
};

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content content1(); 
the "testing content location" doesn't appear where it should...

:(
__________________
My Pets site: MaplePet (Released: No)
Done: Stats system, Adoptables Sex system, Battle and using pokeballs like items to capture pets, stats (luck and dexterity) affecting the chance of capturing, Element system (8 elements), Trading, shopping, inventory system, Pet profile for each pet.
Working: Battle System againsts monsters found in the Map
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with HTML & BBCodes and animated pets A.F.M Questions and Supports 2 08-25-2012 06:32 PM
Pet Spotlight / BBCodes - Problem Kimba Questions and Supports 7 11-27-2011 11:20 AM
Pets from BBCodes usbuzzer Questions and Supports 3 08-23-2009 10:08 PM
bbcodes issue.. zhiichiro Questions and Supports 4 08-05-2009 08:35 AM
not working images in bbcodes zhiichiro Questions and Supports 2 04-27-2009 05:55 AM


All times are GMT -5. The time now is 08:31 AM.

Currently Active Users: 9704 (0 members and 9704 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636