• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Alfraganus

  • Rank

Recent Profile Visitors

2,087 profile views
  1. my yii2 view/site/index is ok and my css is working there fine, however, other pages, for example view/about and view/login are just html without css and working terrible, what could be causing it? why my css is only working in view/index ?
  2. there the difference in syntax and the structure of the applications
  3. Dear programmers, I need to make website with 2 languages in Yii2 basic framework, however, I researched tons of times on google and other search engines and I could only find yii2 advanced internalisation. I need for basic mode, please if you have source codes for yii2 basic multiple languages or if you know any link or video tutorial about yii2 basic internalisation, please kindly share with me, I would be greatly appriciated. I am looking forward from hearing from you soon.
  4. I was trying to make a blog with YII2, my framework is confusing to call data from database. For example when I call "username" from "user" table, <?= DetailView::widget([ 'model' => $model, 'attributes' => [ 'user.fullname', --->> Yii2 is thinking that this is a category and not a user table 'title', 'description', 'content:html', 'count_view', 'status', 'created_at', ], ]) ?> I am getting this error: -->> unknown property: app\models\Category::fullname please could you help me to solve this issue, where I did make a mistake?
  5. yes, resizeImage() is a class, and I found my error, I was trying to reveal the image by jPanel, ans instead, I should have tried it by jLabel, therefore, that was was causing an error
  6. please could anybody explain me what type of error is it and where I should fix it? image.setIcon(ResizeImage(path, null)); ---> This line is causing the error. Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: javax.swing.JPanel.setIcon at kitob.Java_Kitob.Btn_Choose_ImageActionPerformed( at kitob.Java_Kitob.access$000( at kitob.Java_Kitob$1.actionPerformed( at javax.swing.AbstractButton.fireActionPerformed( at javax.swing.AbstractButton$Handler.actionPerformed( at javax.swing.DefaultButtonModel.fireActionPerformed( at javax.swing.DefaultButtonModel.setPressed( at javax.swing.plaf.basic.BasicButtonListener.mouseReleased( at java.awt.Component.processMouseEvent( at javax.swing.JComponent.processMouseEvent( at java.awt.Component.processEvent( at java.awt.Container.processEvent( at java.awt.Component.dispatchEventImpl( at java.awt.Container.dispatchEventImpl( at java.awt.Component.dispatchEvent( at java.awt.LightweightDispatcher.retargetMouseEvent( at java.awt.LightweightDispatcher.processMouseEvent( at java.awt.LightweightDispatcher.dispatchEvent( at java.awt.Container.dispatchEventImpl( at java.awt.Window.dispatchEventImpl( at java.awt.Component.dispatchEvent( at java.awt.EventQueue.dispatchEventImpl( at java.awt.EventQueue.access$500( at java.awt.EventQueue$ at java.awt.EventQueue$ at Method) at$JavaSecurityAccessImpl.doIntersectionPrivilege( at$JavaSecurityAccessImpl.doIntersectionPrivilege( at java.awt.EventQueue$ at java.awt.EventQueue$ at Method) at$JavaSecurityAccessImpl.doIntersectionPrivilege( at java.awt.EventQueue.dispatchEvent( at java.awt.EventDispatchThread.pumpOneEventForFilters( at java.awt.EventDispatchThread.pumpEventsForFilter( at java.awt.EventDispatchThread.pumpEventsForHierarchy( at java.awt.EventDispatchThread.pumpEvents( at java.awt.EventDispatchThread.pumpEvents( at
  7. any suggestions to re-order them correctly?
  8. dear all, I am trying to make dynamic drop down menu but something is wront that I am geting following errors, can you have a look please: Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\as\inc\functions.php on line 14 Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\xampp\htdocs\as\inc\functions.php on line 14 <?php $condb=mysqli_connect("localhost","root","","books") or trigger_error(mysqli_error()); function getLanguage() { global $database; global $condb; $sql="SELECT * FROM LANGUAGES ORDER BY NAME asc"; $rs=mysqli_query($sql,$condb) or die (mysqli_error()); ERROR LINE 14 $rows=mysqli_fetch_assoc($rs); $total_rows=mysqli_num_rows($rs); if ($total_rows>0) { echo "<select name =\"srch_language\" id=\"srch_language\"><br>"; echo "<option value =\"\">any languageā€¦</option>"; do { echo "<option value=\"".$rows['id']."\"> ".$rows['name']."</option><br>"; }while ($rows=mysqli_fetch_assoc($rs)); echo "</select>"; } mysqli_free_result($rs); } ?>
  9. I've been trying to insert my data to database, i've checked db connection, it is ok, but my data is not being inserted to database, it is not even showing error message, can you have a look to my codes if I have written something wrong. <!DOCTYPE html> <html> <head> <title>inserting data</title> </head> <body> <form action="insert_post.php" method="post" enctype="multipart/form-data"> <table width="800" align="center" border="10"> <tr> <td align="center" bgcolor="green" colspan="2"><h1> Insert new post</h1></td></tr> <tr> <td>Post title</td> <td><input type="text" name="title"></td> </tr> <td>Post author</td> <td><input type="text" name="author"></td> </tr> <td>Post image</td> <td><input type="file" name="image"></td> </tr> <td>Post content</td> <td><textarea name="content" cols="60" rows="20 "></textarea>></td> </tr> <td align="center">submit</td> <td><input type="submit" align="center" name="submit" value="upload"></td> </tr> </body> </html> <?php include ('db.php'); if (isset($_POST['submit'])) { $title=$_POST['title']; $date=date('d-m-y'); $author=$_POST['author']; $content=$_POST['content']; $image=$_FILES['image']['name']; $image_tmp=$_FILES ['image'] ['tmp_name']; move_uploaded_file($image_tmp, "images/$image"); $query="INSERT INTO project (post_title, post_date,post_author,post_image,post_content) VALUES ('$title','$date','$author','$image','$content')"; if (mysql_query($query)) { echo "<script>alert('success')</script>"; } else { echo "<script>alert('oxshamadi')</script>"; } }
  10. Dear developers, I've been trying something that I dont know, I would like to place my 5 posts in special pattern, the example of pattern can be in this site, let's say, I want my first post to be on the left with larger size while other 4 posts to be on the right with the same size all, however all posts are from the same table in database, I don't know even its defenition to search it on google, please could you kindly help me to find it, isn't it called something "front end"? if so, where to find it?
  11. I think I did not insert encoding to mysql query
  12. I did, I saved with utf-8 encoding in sublime text 3, and I wrote charset-utf8 in html and php header function, i dont know what wrong with it, it is not working yet
  13. I have written charset utf8 in many ways, however, yet my browser are reading my data with many mistakes, how to enable utf-8 in php files? here is my small part of souce code: <?phpinclude_once("dbconfig.php"); ?> <?php header('Content-Type: text/html; charset=utf-8'); $con=mysqli_connect("localhost","root","","Alfy"); mysqli_set_charset($con,"utf8"); mb_internal_encoding("UTF-8"); ?> <?php include_once('functions.php'); ?> <?php include_once('class.paging.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns=""> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  14. I am trying to configure "read more" function in wordpress for a long time, yet no results, I googled it a lot and I always read to change "the_content" function in wp-includes/post-template.php. I a trying but i dont know something wrong with my modifications, anyone has expreince in changing "read more" function? if yes, could you share your exprience please?
  15. bro please can you type the correct code, can you correct it for me please, I've been trying a lot, but no works(