61
xsell
Try to upload , Always message File not Allowed.
  • 2009/12/22 5:00

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello

So i Modfied this Code to Make Simple Upload Page , without useing XOOPS uploading class. but when i upload an allowed file like zip file , i always get error file not allowed .. when i allowed it as u may see in the code , the funny thing i have no problem uploading file if useing html Form post instaed the DHTML which i used below .. so wht could be Problem

this is the form file.

include("../../mainfile.php");

    
$xoopsOption['template_main']= "test_dhtml.html";
 include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
include_once(
"../../header.php");
$xoopsTpl->assign('form0'$form = new XoopsThemeForm(_MI_TEST_INDEX_PAGE"form_name""send.php"));
$xoopsTpl->assign('upload'$t = new XoopsFormfile(_MI_TEST_YOUR_COMMENT'upload',5030));
$xoopsTpl->assign('uploads'$form->addElement($t));
$xoopsTpl->assign('send'$submit = new XoopsFormButton("""submit"_MI_TEST_EMAIL_SEND_NOW"submit"));
$xoopsTpl->assign('send1'$form->addElement($submit));
$xoopsTpl->assign('send1'$form->render());

    include(
"../../footer.php");



the process File.

<?php
include("../../mainfile.php");
include(
"../../header.php");
$allowed_ext = array('png','zip','PNG');

$ext end(explode('.',$_FILES['upload']['name']));
$ran2 rand().".";
$target "up/";
$target $target $ran2.$ext;
if(
$_FILES['upload']['size'] > 50000000)
{
redirect_header(XOOPS_URL "/modules/test/index.php" 3"".ATTACHMENTS2."");
}

if(
$message == NULL && !in_array($ext,$allowed_ext))  {

redirect_header(XOOPS_URL "/modulels/test/index.php" 3"".ATTACHMENTS1."");
 
}
if(
$message == NULL){

if(
move_uploaded_file($_FILES['upload']['tmp_name'], $target))
{

$message =  "".ATTACHMENTS4."";

}
else
{
redirect_header(XOOPS_URL "/modules/test/index.php" 3"".ATTACHMENTS3."");
}
}
echo 
$message;


include(
"../../footer.php");
?>



62
xsell
Re: debaser 3.05 Abandoned released!
  • 2009/12/19 4:39

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello again

Yah That done , I placed the Javascript code to the Very Top of my Theme and Now it worked .. But Honestly Debaser works good , firefox , Google .. But with IE7 and maybe IE8 not very Good.. Oh Old Microsoft Explorer .. i wish Someone Just Put the Browser to Sleep and Never Make him wake again.. Its Just Not Good Browser But Yet Many Many Still Use it ..in my Site Stats its like More than 90% of my Visitors Use Microsoft Explorer .. i wish Bill gates Just Shot this Pices Of Crap and Give us Break .. EH



63
xsell
Re: debaser 3.05 Abandoned released!
  • 2009/12/18 6:20

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello Frank

Tell Friend , when click the icon while logged as Admin , just dose nothing .. I realy Do not Care Much about it as i will Make My Own Hack to use Pure PHP instaed Javascript ..just thought to tell u if needed fix .. I Have XP Media Center , with IE7 , Firefox. and the Result Same .

another Thing did not work With me is the Search , Something is Not right with the Ajax .. it could Be just me .. I do not know realy ..i will try later make another test when Clean Up my PC .



64
xsell
Re: debaser 3.05 Abandoned released!
  • 2009/12/16 21:05

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thank u frank ,

Just downloaded it and i'm going to rebuild my site now with this version .. but first this error .in the mysql.sql file line 138 ,

1-Need to replace this , with ;

INSERT INTO debaser_player VALUES (180'Flowplayer Video JS''<script type="text/javascript" src="<@urltoscript@>flowplayer-3.1.4.min.js"></script>rn<a href="<@mp3file@>" style="display:block;width:<@width@>px;height:<@height@>px" id="flowplayer<@id@>"></a> rn<script type="text/javascript">rnflowplayer("flowplayer<@id@>", "<@urltoscript@>flowplayer-3.1.5.swf",  { rnclip: { rnautoPlay: false, rnautoBuffering: true,rnscaling: "fit"rn}rn});rn</script>'280500'false''0''flowplayer.gif''flv mp4''flowplayer'1000),


2- Tell Friend dose Not work with me ..i use Firfox , Ghorme, IE7

3- With Single file Upload and Batchload , if want to edit a File the Description is Requier , but its Not Requier when Sending the File (single /batchload) ..

That Means if user Sends a File with no Description , and the admin needs to edit it , he Can not unless he Make up some Description for the file .. So i would Recomended to make it Requier when sending file or Make it Optional on the admin side when try to edit it ..



will Keep testing and come back later :)

Xoops 2.4.2
PHP 2.5.6
MYSQL 5.0.51b




65
xsell
Re: assign page to Template. not working
  • 2009/12/16 0:59

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


thx trabis .. that worked , as matter of fact Some guy told me to do kINDA like your tutorial but i did not try it , was not clear to me as your way .. Anyway i have Moved On to make it with MySQL tabel store the html page.

Thx again :)



66
xsell
Re: assign page to Template. not working
  • 2009/12/15 20:42

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


yes Ghia .. i still do not see why this not working.
<{include file=$page}>


i will try rename the html files to use tpl format instaed html . and see if that makes different .. if not i'm thinking to use MySQL to store the html page and call it with id and see how that goes.



67
xsell
Re: assign page to Template. not working
  • 2009/12/15 2:09

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


I HAVE TRIED THE FULL URL IDEA AND I HAVE DEBUG ON .. AND NO ERORR .



68
xsell
Re: assign page to Template. not working
  • 2009/12/14 23:10

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thx Ghia

If you mean this
<{include file=$page}>

and in the php

$xoopsTpl->assign( "page", $_GET['get'].'test.html' );

i tried it and still Same thing .. it dose not Show the assigned page but Shows the Page it self .. Other words .in the template file this code dose not do any thing
<{include file=$page}>



69
xsell
assign page to Template. not working
  • 2009/12/14 21:22

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello

I have Made very Simple Module to add comment to html pages without useing any content Modules to wrap it up .

all working but I could not assign the html page to the template .

this is the Module index content

<?php

include("../../mainfile.php");

$xoopsOption['template_main'] = 'com.html';
include(
XOOPS_ROOT_PATH."/header.php");


if(isset(
$_GET['get']))
{
  if (
file_exists($_GET['get'].'.html')) {
   include 
$_GET['get'].'.html';
   }
} else {
  include 
'anything.html';
}
$xoopsTpl->assign"page"$_GET['get'].'.html' );
include 
XOOPS_ROOT_PATH.'/include/comment_view.php';
include(
"../../footer.php");
?>


to call Page .
Quote:
http://somexopssite.com/modules/test/index.php?get=test.html


as u can see i assigned pages with html end to the template with smarty verible called page

$xoopsTpl->assign"page"$_GET['get'].'.html' );


Now in my template i have this

{include file=$page}

<
div style="text-align: center; padding: 3px;
margin:3px;"
>
<{
$commentsnav}>
<{
$lang_notice}>
</
div>

<
div style="margin:3px; padding: 3px;">
<!-- 
start comments loop -->
<{if 
$comment_mode == "flat"}>
<{include 
file="db:system_comments_flat.html"}>
<{elseif 
$comment_mode == "thread"}>
<{include 
file="db:system_comments_thread.html"}>
<{elseif 
$comment_mode == "nest"}>
<{include 
file="db:system_comments_nest.html"}>
<{/if}>
<!-- 
end comments loop -->
</
div>


and when i call the page as mentioned above . it opens the page but ignors the "{include file=$page}" this makes the comment Navgatore Shows above the Contenet instaed in the Bottom ..

any idea .. whts wrong



70
xsell
Re: intergate dhtml
  • 2009/11/30 23:42

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thx Ghia , yah i placed the plug in there and worked fine , But realy i wanted the Tutorial how to intergate dhtml , or other Modules , wht is the Point Having All this editors and No Clear tutorial How to intergate them with xoops.




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 21 »



Login

Who's Online

173 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits