Search Results

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

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

  • Mcafee PCI Compliance failing on Session ID cookie?

    - by frio80
    Hello there. I am attempting to obtain PCI compliance for my site but the Mcafee security scan has thrown a: Potential Sensitive Persistent Cookie Sent Over a Non-Encrypted (SSL) Channel Drupal (default behavior) sets a session cookie when you simply arrive at the site. This is causing the problem. Clearly, the entire site shouldn't be under SSL; plenty of other sites set session cookies like this. What gives?

    Read the article

  • A PDF viewer with a toolbar actions

    - by amirouche
    A want a Drupal who let me to the Adminintrator upload a pdf files and the users can read them in a viewer with a Toolbar that contains print, download and quit boutons like the link text website. The possibility to have statistics on user's Toolbar actions will be appreciated.

    Read the article

  • Should $new_link be used in mysql_connect()?

    - by Eddie
    I'm maintaining an inherited site built on Drupal. We are currently experiencing "too many connections" to the database. In the /includes/database.mysql.inc file, @mysql_connect($url['host'], $url['user'], $url['pass'], TRUE, 2) (mysql_connect() documentation) is used to connect to the database. Should $new_link = TRUE be used? My understanding is that it will "always open a new link." Could this be causing the "too many connections"?

    Read the article

  • Hook perm for more than one content type

    - by Andrew
    Drupal 6.x I have this module that manages four different content types. For that matter, how do I define permission for each content within the same module? Is that even possible? I can't figure out how to define permission for each content type cuz hook_perm has to be named with module name and it doesn't have any argument(like hook_access $node) to return permission base on content type. Any help would be highly appreciated.

    Read the article

  • Google add sence reference

    - by mepo
    My client have a google add sense account and one add campaign with several adds under it. Clients needs to identify the Incoming users who comes through clicking each add. Client uses Drupal PHP site. Is there a possibility to track incoming users who comes through google adds.

    Read the article

  • Tools and tips for switching CMS

    - by Jimmy
    I work for a university, and in the past year we finally broke away from our static HTML site of several thousand pages and moved to a Drupal site. This obviously entails massive amounts of data entry. What if you're already using a CMS and are switching to another one that better suits your needs? How do you minimize the mountain of data entry during such a huge change? Are there tools built for this, or some best practices one should follow?

    Read the article

  • Can I tell sitecrawlers to visit a certain page?

    - by Ace
    Hi there! I have this drupal website that revolves around a document database. By design you can only find these documents by searching the site. But I want all the results to be indexed by Googlebot and other crawlers, so I was thinking, what if I make a page that lists all the documents, and then tell the robots to visit the page to index all my documents..? Is this possible, or is there a better way to do it?

    Read the article

  • Low Voting {API(Five Star)} Feedback

    - by D.J.
    Is there any module in drupal which provides low rating feedback. eg If someone wants to vote a content as <= 2 (out of 5). Before he does so, there will be a pop up window displaying text "Are you sure you want to rate so low?" etc. If there is no such module then is there any easy way of doing it?

    Read the article

  • mod_rewite Rule: root/? root/app/views/home/home.php

    - by Jonathon David Oates
    I am shocking at mod_rewite, here's the scenario: I need a rule that rewrites mydomain.com to mydomain.com/app/views/home/home.php. The rule, or set of rules rather, must also rewite mydomain.com/signin to mydomain.com/app/views/signin/signin.php, and work in a similar fashion for any subdirectory, for example: mydomain.com/subdir must redirect to mydomain.com/app/views/subdir/subdir.php. The rules must also work with or without the trailing slash, for example: ….com or ….com/. Thank you all, your help is much appreciated! If you could outline how and why your solution works or direct me to a good resource that explains it, I'd be exceptionally grateful! Edit: I have got a simple .htaccess file with this: Options +FollowSymLinks RewriteEngine On RewriteRule ^$ http://mydomain.local/~Jay/some_awesome_app/app/views/home/home.php This does the redirect but changes the URL in the address bar too! I've not got a trailing [R] flag so why would this be?

    Read the article

  • Return template as string - Django

    - by Ninefingers
    Hi All, I'm still not sure this is the correct way to go about this, maybe not, but I'll ask anyway. I'd like to re-write wordpress (justification: because I can) albeit more simply myself in Django and I'm looking to be able to configure elements in different ways on the page. So for example I might have: Blog models A site update message model A latest comments model. Now, for each page on the site I want the user to be able to choose the order of and any items that go on it. In my thought process, this would work something like: class Page(models.Model) Slug = models.CharField(max_length=100) class PageItem(models.Model) Page = models.ForeignKey(Page) ItemType = models.CharField(max_length=100) InstanceNum = models.IntegerField() # all models have primary keys. Then, ideally, my template would loop through all the PageItems in a page which is easy enough to do. But what if my page item is a site update as opposed to a blog post? Basically, I am thinking I'd like to pull different item types back in different orders and display them using the appropriate templates. Now, I thought one way to do this would be to, in views.py, to loop through all of the objects and call the appropriate view function, return a bit of html as a string and then pipe that into the resultant template. My question is - is this the best way to go about doing things? If so, how do I do it? If not, which way should I be going? I'm pretty new to Django so I'm still learning what it can and can't do, so please bear with me. I've checked SO for dupes and don't think this has been asked before...

    Read the article

  • MVC2: Validate PartialView before Form Submit of Page containing Partial View

    - by Pascal
    I am using asp.net mvc2 and having a basic Page that includes a Partial View within a form <% using (Html.BeginForm()) { %> <% Html.RenderAction("partialViewActionName", "Controllername"); %> <input type="submit" value="Weiter" /> <% } %> When I submit the form, the httpPost Action of my Page is called, and AFTER that the httpPost Action of my Partial View is called [HttpPost] public virtual ActionResult PagePostMethod(myModel model) { // here I should know about the validation of my partial View // If partialView.ModelState is valid then // return View("success"); // else return View(model) } [HttpPost] public virtual ActionResult partialViewActionName(myModel model) { ModelState.AddModelError("Error"); return View(model); } But as I am doing the Validation in the httpPost Method of my Partial View (because I want to use my Partial View in several Places) I cant decide if my hole page is valid or not. Has anyone an Idea how I could do this? Isn´t it a common task to have several partial Views in a page but have the information about validation in the page action methods? Thanks very much for your help!!

    Read the article

  • Custom view with nib as subview doesn't seem to be loading

    - by Ben Collins
    I've created a custom view that loads its content from a nib, like this: /* PricingDataView.h */ #import <UIKit/UIKIt.h> @interface PricingDataView : UIView { UIView *contentView; } @property (nonatomic, retain) IBOutlet UIView *contentView; @end /* PricingDataView.m */ #import "PricingDataView.h" @implementation PricingDataView @synthesize contentView; - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { [[NSBundle mainBundle] loadNibNamed:@"PricingDataView" owner:self options:nil]; [contentView setFrame:frame]; [self addSubview:contentView]; } return self; } /* ... */ In the nib file I set PricingDataView as the type of the File's Owner, and connected the contentView outlet in IB. I placed a regular UIView from the Interface Library onto the full-sized view shown to the user, and then changed it's class name to PricingDataView. It all builds, but at runtime, nothing is rendered where my custom view is supposed to be. I put breakpoints in PricingDataView.initWithFrame, but they don't hit, so I know I'm missing something that would cause the view to be initialized. What I'm curious about is that int the process of loading my other views from nibs, all the initialization happens for me, but not with this one. Why?

    Read the article

  • How to html encode the output of an NHaml view (or any MVC view)?

    - by jessegavin
    I have several views written in NHaml that I would like to render as encoded html. Here's one. %table.data %thead %tr %th Country Name %th ISO 2 %th ISO 3 %th ISO # %tbody - foreach(var c in ViewData.Model.Countries) %tr %td =c.Name %td =c.Alpha2 %td =c.Alpha3 %td =c.Number I know that NHaml provides syntax to Html encode the output for given lines using &=. However, in order to encode the entire view, I would essentially lose the benefit of writing my view in NHaml since it would have to look like this.... &= "<table class='data'> &= " <thead> So I was wondering if there was any cool way to be able to capture the rendered view as a string, then to html encode that string. Maybe something like the following??? public ContentResult HtmlTable(string format) { var m = new CountryViewModel(); m.Countries = _countryService.GetAll(); // Somehow render the view and store it as a string? // Not sure how to achieve this. var viewHtml = View("HtmlTable", m); // ??? return Content(viewHtml); } This question may actually have no particular relevance to the View engine that I am using I guess. Any help or thoughts would be appreciated.

    Read the article

  • Django and json request

    - by Hulk
    In a template i have the following code <script> var url="/mypjt/my_timer" $.post(url, paramarr, function callbackHandler(dict) { alert('got response back'); if (dict.flag == 2) { alert('1'); $.jGrowl("Data could not be saved"); } else if(dict.ret_status == 1) { alert('2'); $.jGrowl("Data saved successfully"); window.location = "/mypjt/display/" + dict.rid; } }, "json" ); </script> In views i have the following code, def my_timer(request): dict={} try: a= timer.objects.get(pk=1) dict({'flag':1}) return HttpResponse(simplejson.dumps(dict), mimetype='application/javascript') except: dict({'flag':1}) return HttpResponse(simplejson.dumps(dict), mimetype='application/javascript') My question is since we are making a json request and in the try block ,after setting the flag ,cant we return a page directly as return render_to_response('mypjt/display.html',context_instance=RequestContext(request,{'dict': dict})) instead of sending the response, because on success again in the html page we redirect the code Also if there is a exception then only can we return the json request. My only concern is that the interaction between client and server should be minimal. Thanks..

    Read the article

  • What is the best way using multiple lines of <% %> Tag or <% %> Tag with multiple lines?

    - by Salil
    Sorry if the title is not enough to understand what i am asking about. I am rails developer and i used multiple lines of <% % in my views but now i realized that it's not best practice so i came here and like to you all excellent guys what is the correct way in ROR? For example if i required to something like following <% user =User.all %> <% name= [] %> <% count = 0 %> <% for user in users %> <% name << user.name %> <% count+=1%> <% end %> Can i do it as follows ? <% user =User.all name= [] count = 0 for user in users name << user.name count+=1 end %> I know better way of collecting element from array But above is just example. But my question is, is it possible and if yes which is the correct way?

    Read the article

  • iPhone SDK: Switching to one view then back to previous view errors

    - by Nic Hubbard
    I have a UITabBarConroller that I use to switch between 3 different views. This all works perfectly. On one of my tabs, I added a button at the to called "Add", I have added an outlet to this, as well as an IBAction method which looks like the following: // Method used to load up view where we can add a new ride - (IBAction)showAddNewRideView { MyRidesViewController *controller = [[MyRidesViewController alloc] initWithNibName:@"AddNewRide" bundle:nil]; controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:controller animated:YES]; [controller release]; }//end showAddNewRideView This currently works fine, and loads up my AddNewRide nib file. But, once that view loads, I have a cancel button, which, when clicked, I want to return to the previous view. So, I figured I would just do the reverse of the above, using the following method which would load back my previous nib: - (IBAction)cancelAddingNewRide { MyRidesViewController *controller = [[MyRidesViewController alloc] initWithNibName:@"MainWindow" bundle:nil]; controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:controller animated:YES]; [controller release]; }//end cancelAddingNewRide But, which trying to load the MainWindow nib, the program crashes, and I get the following error: 2010-05-05 20:24:37.211 Ride[6032:207] *** -[MyRidesViewController cancelAddingNewRide]: unrecognized selector sent to instance 0x501e450 2010-05-05 20:24:37.213 Ride[6032:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[MyRidesViewController cancelAddingNewRide]: unrecognized selector sent to instance 0x501e450' So, I am a little lost as to why it would work one way, but not the other.

    Read the article

  • two controllers in one layout, rails 3

    - by Grizlord
    Okay, I have two models, a recipe model and a category model. In my layout(application.html.erb) I have a main container div that "yields" the recipes index action. I'm trying to list all the category names as links in a side bar(also a div) by iterating over them in an unordered list. When you click one of the links it will go to the category show page which will then list all the recipes in that category. Here is how I'm trying to list the links in - <div class="container" id="categories"> <% for category in @categories %> <ul> <li><%= link_to category.name, category %></li> </ul> <% end %> </div> The problem is I get a NoMethodError - You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each It is not retrieving the records from the model. Any suggestions on how to get this done would be greatly appreciated. I tried to render a partial as some of the other similar posts have said but still get the same error. This is the exact error - NoMethodError in Recipes#index Showing /Users/grizlord/Rails/recipe2/app/views/layouts/application.html.erb where line #39 raised: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each Extracted source (around line #39): 36: </div> 37: <div class="container" id="categories"> 38: Browse by Category 39: <% for category in @categories %> 40: <ul> 41: <li><%= link_to category.name, category %></li> 42: </ul>

    Read the article

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