Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 68/278 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Problem with SQL syntax (probably simple)

    - by Bryan Folds
    I'm doing some custom database work for a module for Drupal and I get the following SQL error when trying to create my table: user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT NULL, rooms INT DEFAULT NULL, adults INT DEFAULT NULL, children' at line 14 query: CREATE TABLE dr_enquiry ( eId INT unsigned NOT NULL auto_increment, eKey VARCHAR(16) NOT NULL, dateSent INT NOT NULL DEFAULT 0, status VARCHAR(30) NOT NULL DEFAULT 'Unanswered', custName VARCHAR(50) NOT NULL, custEmail VARCHAR(200) NOT NULL, custPhone VARCHAR(25) NOT NULL, custCountry VARCHAR(40) NOT NULL, custIP VARCHAR(11) DEFAULT NULL, offerName VARCHAR(100) NOT NULL, offerURL VARCHAR(200) NOT NULL, arrival DATETIME DEFAULT NULL, departure DEFAULT NULL, rooms INT DEFAULT NULL, adults INT DEFAULT NULL, children INT DEFAULT NULL, childAges VARCHAR(32) DEFAULT NULL, toddlers INT DEFAULT NULL, toddlerAges VARCHAR(32) DEFAULT NULL, catering VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, agent VARCHAR(100) DEFAULT NULL, voucher VARCHAR(100) DEFAULT NULL, PRIMARY KEY (eId) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/travelco/public_html/includes/database.inc on line 550.

    Read the article

  • Problems using MySQL instead of MySQLi

    - by vaibhav
    I have a blog, which is on Drupal v6.14. Recently I changed my web hosting provider. My new hosting provider does'nt support MySQLi. So I have to use MySQL instead of MySQLi. All things worked fine for some days. But on a very fine morning, I found my blog is down and the error message was Mysql: Too Many Connections to the server. And this problem occurs several times a day now. I contacted my web hosting provider, they said, its a problem in your database. I don't trust this. My blog was working fine at old web server. Can it be a problem because of I moved to MySQL from MYSQLi.

    Read the article

  • jquery cycle plugin using RSS feed images?

    - by Chris
    This could well be a terribly ignorant question, if so please forgive me: I'm using jquery cycle plugin to create an image rotator of recently posted images. Im using drupal 6.x and created an RSS feed of the recent images using the views module. I have no idea how to connect the two. Any suggestions? I have a feeling an RSS feed might not be the best way to go about this, but it's all I could come up with. Thanks for the help.

    Read the article

  • How to display the rss version of a News Link

    - by cbrown16
    I'm trying to write a script that will show the rss version of a single url (title, author, image, source, etc..). This should behave much the way that facebook does when you copy paste a link to share and it generates this information automatically. I'm trying to do this with a php script but would also be open to opensource programs that can do this as well. also, if anyone knows of any Joomla/Drupal plugins that can do this that would be great. This may eventually end up on a site run on one of these frameworks. thanks!!

    Read the article

  • Edit and create nodes in a view?

    - by tputkonen
    We are storing people's class attendance information to Drupal. We would like to show this in a grid/chart, where the first column of each row shows person's name, and rest of the columns (ca. 20) either a checkbox or "X" if the user attended a class, or otherwise an non-checked box or empty column: (dates here) Jack X XXX X X Jill XX XXX XX It should also be possible to edit the attendance information on the grid. Each attendance information is a node of its own. This functionality can probably mostly be achieved using views and editablefields, but there is one problem: if a person has not attended a specific class he/she will not have at all an attendace node for that day. What would be the easiest way to create an attendace node in those cases, so that it would be possible for the end user to edit the grid by just clicking on the checkbox or typing an 'X'?

    Read the article

  • Automatic open Colorbox modal window

    - by user1631168
    I'm using the Colorbox module in Drupal 7. I'm opening an external website. I can make it work with a link. Click here, then click the "colorbox popup" link at the bottom, middle column. The client would like this to open automatically when the page opens. I've created a block and added the following code (from the colorbox site). <script type="text/javascript"> // Display a welcome message on first visit, and set a cookie that expires in 30 days: if (document.cookie.indexOf('visited=true') === -1) { var expires = new Date(); expires.setDate(expires.getDate()+30); document.cookie = "visited=true; expires="+expires.toUTCString(); jQuery.colorbox({html:"http://join.raretearepublic.com/popup/", width:887, height:638}); } </script> But it does not work. Any help would be greatly appreciated.

    Read the article

  • hook_form for multiple content types defined by the same module

    - by pao13gate
    A new module 'foo' implements foo_node_info() where one or more new content types can be defined. If foo_node_info() defines two content types, namely a content type 'footypea' and a content type 'footypeb', how does one go about implementing hook_form() (what should the name of the "hook" be?) to configure each node's editing form? In the drupal example, the name of the new content type is the same as the module name. What happens in the above described example where two new content types are defined by the module? Should the implemented hook_form() function be of the form: footypea_form() and footypeb_form() ? (this doesn't seem to work) Or should you implement a single foo_form() function and within this create and return an array $form with elements $form['footypea'] and $form['footypeb'] that are in turn arrays of the individual form field definitions?

    Read the article

  • Multiple sections on landing page only

    - by RDRAO
    Hi every one, I am very much new to Drupal but am loving it to start with. I got struck at a point with respect to theaming. I have a region called 'footer-teaser' just above footer. Its width is 800px. its been split into 3 equal size columns. Each column has the following. Image of size 120x120 Some teaser text Link to 'read more' The design requirement is all the above should be editable by the admin from the admin interface. If its static i would have hardcoded this but since the requirement is dynamic, i am not aware of how to achieve this. I have customised page.tpl for other sections of the page except this. I am sure someone else would have faced this issue before and was wondering if anyone can direct me in the right direction? Even better if an example is provided. Cheers RD

    Read the article

  • Adding a javascript immediate after body tag

    - by prabdrup
    I am making a drupal module. My requirement in the module is that when the module is activated then it needs to add a javascript in page.tpl file just after the body tag. Can anyone help me how to do this. I have tried using drupal_add_js but it will not exactly put the script after body tag, rather puts inside the head or below in footer. I also tried using template variable and preprocess method but the problem is the preprocess method replaces the old value of that variable with the new one. Is there a way how i can implement this in.

    Read the article

  • druapal content image not showing

    - by tibin mathew
    hi, I'm doing a drupal site. i want show a facebook image in my page content in home page. i have edited content of that page. i have edited the body of that content through admin and put the text in body like this The BikeGlow™ Safety Light runs on 2-AA batteries. Light tube length is 10'. Complete unit weighs under 2 oz (without batteries). Light tube attaches to frame with included attachment strips. "It's like magic cycling protection from cars!" < img src='bikeglow_com/sites/default/files/5u84f48n.gif' alt="facebook" / but after saving image is not showing there even that alt tag is not coming. can any one help me, what will be reason for his

    Read the article

  • Theme the node-create and node-edit template

    - by Toxid
    I'm using drupal 6. I've managed to make a .tpl file for one content type, that is for images in my image gallery. I did that by adding this code in template.php: function artbasic_theme($existing, $type, $theme, $path) { return array( 'galleryimage_node_form' => array( 'arguments' => array('form' => NULL), 'template' => 'galleryimage_node_form' ) ); } And then I created galleryimage_node_form.tpl.php, and was good to go. Now it happens so that I want to have other template files for the forms of other content types, for example link_contrib_node_form.tpl.php. I've tried a couple of ways to change this function to include more content types, but I can't figure it out. Can anyone help?

    Read the article

  • access a property via string with array in php?

    - by sprugman
    (This is in drupal, but I don't really think that matters.) I have a big list of properties that I need to map between two objects, and in one, the value that I need to map is buried inside an array. I'm hoping to avoid hard-coding the property names in the code. If I have a class like this: class Product { public $colors, $sizes; } I can access the properties like this: $props = array('colors', 'sizes'); foreach ($props as $p) { $this->$p = $other_object->$p; } As far as I can tell, if each of the properties on the left are an array, I can't do this: foreach ($props as $p) { $this->$p[0]['value'] = $other_object->$p; } Is that correct, or am I missing some clever way around this?

    Read the article

  • Problem in migrating to LAMP from XAMPP.. Memory limit error

    - by Geshan
    I was using XAMPP for my local machine but as I wanted to run applications like mysql work bench and some test frameworks I decided to switch to LAMP self install. I'm using ubuntu and followed the instructions at: https://help.ubuntu.com/community/ApacheMySQLPHP But the problem is LAMP is consuming too much of my memory (RAM) I've allocated 124 MB currently but still it gives me memory exhausted error when I run Drush (Drupal command line). When I do drush cc to clear cache it give me the following: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /var/www/----/sites/all/modules/ubercart/uc_order/uc_order.order_pane.inc on line 150 Call Stack: 0.0020 185624 1. {main}() /opt/drush/drush.php:0 0.0254 1303672 2. drush_main() /opt/drush/drush.php:37 0.2674 5107784 3. drush_bootstrap() /opt/drush/drush.php:71 0.2676 5109872 4. _drush_bootstrap_drupal_full() /opt/drush/includes/environment.inc:173 0.2676 5151032 5. drupal_bootstrap() /opt/drush/includes/environment.inc:655 0.3030 7739048 6. _drupal_bootstrap() /var/www/missmoti/includes/bootstrap.inc:989 0.3122 8855792 7. _drupal_bootstrap_full() /var/www/missmoti/includes/bootstrap.inc:1078 0.3445 12387320 8. module_load_all() /var/www/missmoti/includes/common.inc:2608 0.5194 32586544 9. drupal_load() /var/www/missmoti/includes/module.inc:14 0.5251 33361112 10. include_once('/var/www/missmoti/sites/all/modules/ubercart/uc_order/uc_order.module') /var/www/-----/includes/bootstrap.inc:617 Drush command could not be completed. In each error it shows me a back trace and I guess this default debugger I'm not aware of in Apache or my PHP config it eating up the memory. If anyone can help I"d be glad. Another error below: Fatal error: Call to undefined function dsm() in /var/www/-----/sites/all/modules/custom/gtpath/gtpath.module on line 180 Call Stack # Time Memory Function Location 1 0.0002 120144 {main}( ) ../index.php:0 2 1.7604 68224112 theme( ) ../index.php:36 3 2.0188 77346112 call_user_func_array ( ) ../theme.inc:658 4 2.0188 77347024 gtpath_preprocess_page( ) ../theme.inc:0 how do I deal with this default debugger? how do I turn it off??

    Read the article

  • How many users are sufficient to make a heavy load for web application

    - by galymzhan
    I have a web application, which has been suffering high load recent days. The application runs on single server which has 8-core Intel CPU and 4gb of RAM. Software: Drupal 5 (Apache 2, PHP5, MySQL5) running on Debian. After reaching 500 authenticated and 200 anonymous users (simultaneous), the application drastically decreases its performance up to total failure. The biggest load comes from authenticated users, who perform activities, causing insert/update/deletes on db. I think mysql is a bottleneck. Is it normal to slow down on such number of users? EDIT: I forgot to mention that I did some kind of profiling. I runned commands top, htop and they showed me that all memory was being used by MySQL! After some time MySQL starts to perform terribly slow, site goes down, and we have to restart/stop apache to reduce load. Administrators said that there was about 200 active mysql connections at that moment. The worst point is that we need to solve this ASAP, I can't do deep profiling analysis/code refactoring, so I'm considering 2 ways: my tables are MyIsam, I heard they use table-level locking which is very slow, is it right? could I change it to Innodb without worry? what if I take MySQL, and move it to dedicated machine with a lot of RAM?

    Read the article

  • Adding date to multiple fields via datepicker

    - by Andy
    i have a form in drupal with jquery based date module. there are multiple fields with date picker enabled. i want to set the value of all of them (they all have class .date-popup-init) to the value of the first field (#edit-field, the 'from' date) when that field is set. my code so far: <script type="text/javascript"> var DatePicked = function() { var firstdate = $("#edit-field"); var updater = firstdate.datepicker("getDate"); $(".date-popup-init").each(function(){ $(this).datepicker("setDate", updater); }); } $(function() { $("#edit-field").datepicker({ onSelect: DatePicked }); }); </script> this seems to randomly work; it sets the date of some fields to the value of #edit-field, seemingly different fields each time. also, the form adds more datepicker-enabled fields via ajax. is there any way to ensure that all these new fields, when they load, pick up the value of #edit-field as well? disclaimer: last night was my first attempt at javascript of any kind. i have a basic idea now. the above was cobbled through countless google examples.

    Read the article

  • How can I make PHP scripts timeout gracefully while waiting for long-running MySQL queries?

    - by Mark B
    I have a PHP site which runs quite a lot of database queries. With certain combinations of parameters, these queries can end up running for a long time, triggering an ugly timeout message. I want to replace this with a nice timeout message themed according to the rest of my site style. Anticipating the usual answers to this kind of question: "Optimise your queries so they don't run for so long" - I am logging long-running queries and optimising them, but I only know about these after a user has been affected. "Increase your PHP timeout setting (e.g. set_time_limit, max_execution_time) so that the long-running query can finish" - Sometimes the query can run for several minutes. I want to tell the user there's a problem before that (e.g. after 30 seconds). "Use register_tick_function to monitor how long scripts have been running" - This only gets executed between lines of code in my script. While the script is waiting for a response from the database, the tick function doesn't get called. In case it helps, the site is built using Drupal (with lots of customisation), and is running on a virtual dedicated Linux server on PHP 5.2 with MySQL 5.

    Read the article

  • How to prevent window list "confusion" when detaching eclipse views?

    - by amotzg
    I'm detaching eclipse views to float on my other screen in order to get more coding space on the first screen. When doing that, the detached windows appear in ubuntu's window list applet with the eclipse icon but with no title. Then, when pushing the main eclipse button on the window list, one of the detached views will get to front but not the main eclipse window. When using Alt+tab I can also see the extra eclipse icons but choosing the correct one for the main window works and make it the active window while also showing all detached childs. Other applications behave as expected, e.g. gimp floating panels don't show on the windows list and this is also the case with SlickEdit, Firefox child windows all show on window list but gets the focus correctly, etc. I can see the the workspace switcher show my two screens but in 'Monitor preferences' I see my two screens as one big screen. I'm working with ubuntu 10.04.4 under a VMware Workstation 7.1.3 build-324285. 'uname -a' output: Linux ubuntu 2.6.32-40-generic #87-Ubuntu SMP Tue Mar 6 00:56:56 UTC 2012 x86_64 GNU/Linux The desktop screen shot with the problem, ununtu's version, and Monitor preferences. How can I solve it and make only the main window show in window list or at least get activated when pushing it's button on the window list?

    Read the article

  • MVC Partial View to Call Display Pop-up window using jquery

    - by Gavin campbell
    Hi I have a index page the renders objects from my database as a treeview, each item has a link href="/MessageGroupType/Edit/1002 that makes an Ajax call to display a partial view in a DIV. Within the partial view there is a delete button which calls my controller to delete the item. However, i do a check to make sure the item can be deleted, if the item cant be deleted then i wish a pop-up to appear back on the edit form telling the user they cant delete this record. In my Edit partial view i have the following code " type="text/javascript" $(function() { $("#dialog").dialog(); }); <% if (Boolean.Parse(ViewData["DisplayWindow"].ToString())){% This Mesage group Type Cannot be deleted as is linked to other message group Types <% }% So my main questions are Can i make a reference to a javascript script within my Partial View (i dont want my master page to be called on the partial view) When i dynamically load the partial view data into my DIV - can i then after calling my controller insert another DIV into the first DIV. I am i doing this the wrong way - so any pointers is appreciated Cheers

    Read the article

  • Refresh conent with JQuery/AJAX after using a MVC partial view

    - by Aaron Salazar
    Using the following JQuery/AJAX function I'm calling a partial view when an option is changed in a combobox named "ReportedIssue" that is also in the partial view. The is named "tableContent". <script type="text/javascript"> $(function() { $('#ReportedIssue') .change(function() { var styleValue = $(this).val(); $('#tableContent').load( '/CurReport/TableResults', { style: styleValue } ); }) .change(); }); </script> My problem is that after the jump to the partial view I lose the link to the javascript. I think I'm supposed to use the JQuery ".live()" but I'm unsure. In short, I want to re-establish the link between my JavaScript and my combobox and after the inclusion of the partial view's HTML. I hope I'm being clear enough, Aaron

    Read the article

  • Calling a MVC2 partial view using jquery returns empty string problem

    - by Jason
    I have an issue where I have a partial view that returns some HTML to be displayed. Its called when something is clicked on the page using jquery. The problem is that no matter how I call it, i get back an empty string even though it reports success. This is happening to me using Chrome, going against my local machine. My controller looks like this: public ActionResult MyPartialView() { return PartialView(model); } I have tried jquery using .get(), .post() and .load() and all have the same results. Here is an example using .post(): $.post(url, function (data) { alert(data); }); The result always comes back as an empty string. I can navigate to the partial view in the browser manually and i get back the desired HTML. The URL I am using to call it I resolved fully so it looks like "http://localhost/controller/mypartialview" rather than using the relative path of "/controller/mypartialview" which I thought was the original problem. Any idea what may cause this?

    Read the article

  • Change user email in Django without using django-profiles

    - by mridang
    Hi guys, In my Django application I would like the user to be able to change the email address. I've seen solution of StackOverflow pointing people to django-profiles. Unfortunately I don't want to use a full fledged profile module to accomplish a tiny feat of changing the users email. Has anyone seen this implemented anywhere. The email address verification procedure by sending a confirmation email is a requisite in this scenario. I've spent a great a deal of time trying to a find a solution that works but to no avail. Cheers.

    Read the article

  • MVC 2: Html.TextBoxFor, etc. in VB.NET 2010

    - by Brian
    Hello, I have this sample ASP.NET MVC 2.0 view in C#, bound to a strongly typed model that has a first name, last name, and email: <div> First: <%= Html.TextBoxFor(i => i.FirstName) %> <%= Html.ValidationMessageFor(i => i.FirstName, "*") %> </div> <div> Last: <%= Html.TextBoxFor(i => i.LastName) %> <%= Html.ValidationMessageFor(i => i.LastName, "*")%> </div> <div> Email: <%= Html.TextBoxFor(i => i.Email) %> <%= Html.ValidationMessageFor(i => i.Email, "*")%> </div> I converted it to VB.NET, seeing the appropriate constructs in VB.NET 10, as: <div> First: <%= Html.TextBoxFor(Function(i) i.FirstName) %> <%= Html.ValidationMessageFor(Function(i) i.FirstName, "*") %> </div> <div> Last: <%= Html.TextBoxFor(Function(i) i.LastName)%> <%= Html.ValidationMessageFor(Function(i) i.LastName, "*")%> </div> <div> Email: <%= Html.TextBoxFor(Function(i) i.Email)%> <%= Html.ValidationMessageFor(Function(i) i.Email, "*")%> </div> No luck. Is this right, and if not, what syntax do I need to use? Again, I'm using ASP.NET MVC 2.0, this is a view bound to a strongly typed model... does MVC 2 still not support the new language constructs in .NET 2010? Thanks.

    Read the article

  • ASP.NET MVC 2 loading partial view using jQuery - no client side validation

    - by brainnovative
    I am using jQuery.load() to render a partial view. This part looks like this: $('#sizeAddHolder').load( '/MyController/MyAction', function () { ... }); The code for actions in my controller is the following: public ActionResult MyAction(byte id) { var model = new MyModel { ObjectProp1 = "Some text" }; return View(model); } [HttpPost] public ActionResult MyAction(byte id, FormCollection form) { // TODO: DB insert logic goes here var result = ...; return Json(result); } I am returning a partial view that looks something like this: <% using (Html.BeginForm("MyAction", "MyController")) {%> <%= Html.ValidationSummary(true) %> <h3>Create my object</h3> <fieldset> <legend>Fields</legend> <div class="editor-label"> <%= Html.LabelFor(model => model.ObjectProp1) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.Size.ObjectProp1) %> <%= Html.ValidationMessageFor(model => model.ObjectProp1) %> </div> div class="editor-label"> <%= Html.LabelFor(model => model.ObjectProp2) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.ObjectProp2) %> <%= Html.ValidationMessageFor(model => model.ObjectProp2) %> </div> <p> <input type="submit" value="Create" /> </p> </fieldset> <% } %> Client side validation does not work in this case. What is more the script that contains validation messages also isn't included in the view that's returned. Both properties in my model class have Required and StringLength attributes. Is there any way to trigger client side validation in a view which has been loaded like this?

    Read the article

  • ASP.NET MVC Strongly Typed Partial View, gives could not load type error

    - by Matt
    I am attempting to create a strongly typed view with a "MVC View User Control" that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %> There is nothing else on this page, currently. When I execute the app and load the page that renders this control, I get the following error: Could not load type 'System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>'. So, then I simplified it: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<String>" %> And then, just in case it needed to be fully qualified: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.String>" %> Everytime I get the same error (substituting type). what am I doing wrong here? I'm on .NET 3.5 with ASP.NET MVC 1.0 RTM.

    Read the article

  • load jquery function from a href onclick

    - by QuBaR
    I have a html table with a column per row with this html code inside the tags: <a onclick="modalDialog(this); return false;" href="javascript:void(0)">17795</a> <div style="display: none;" class="MessageDataDiv"> some text to show up in my jquery modal window when function modaldialog is clicked. </div> And the jquery function that is called when onclick is fired within the a href link function modalDialog(event) { $('a.message').click(function () { var div = new $(this).closest("td").find(".MessageDataDiv").clone(); div.show().dialog(); event.preventDefault(); }); } Can anyone help me with some advice how to write the jquery function more correct so the function only fires one time when the linked is clicked. I need to have the jquery function modalDialog as a separate function because the html table use ajax partial rendering... The problem is when i click the a href link first time nothing happens, second click on the links gives med two modal dialog and third click gives me three modal dialog and so on...

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >