Jump to content

Alfraganus

Members
  • Posts

    60
  • Joined

  • Last visited

Recent Profile Visitors

3,808 profile views

Alfraganus's Achievements

Newbie

Newbie (1/7)

0

Reputation

  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(Java_Kitob.java:323) at kitob.Java_Kitob.access$000(Java_Kitob.java:29) at kitob.Java_Kitob$1.actionPerformed(Java_Kitob.java:152) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
  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. Alfraganus

    data insertion

    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 https://kun.uz/, 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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <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. Alfraganus

    pages.php

    bro please can you type the correct code, can you correct it for me please, I've been trying a lot, but no works(
×
×
  • Create New...