Search Results

Search found 416 results on 17 pages for 'permalink fu'.

Page 1/17 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Regex to detect a proper permalink?

    - by Fedor
    These permalinks above are rerouted to my page: page.php?permalink=events/foo page.php?permalink=events/foo/ page.php?permalink=ru/events/foo page.php?permalink=ru/events/foo/ The events is dynamic, it could be specials or packages. My dilemma is basically; I need to detect an empty link in order so I can feed a robots no index meta tag in the case of: page.php?permalink=events page.php?permalink=events/ page.php?permalink=ru/events/ page.php?permalink=ru/events I can't use a simple pattern such as [a-zA-Z]+\/?(.+)/ since it won't work on the i18n permalinks. What regex could I use which would detect this, using $_GET['permalink'] as the reference to the permalinks? And avoid false positives? Update: Empty link means there's no fragment after the "events/" part. These are empty: page.php?permalink=events page.php?permalink=events/ page.php?permalink=ru/events/ page.php?permalink=ru/events

    Read the article

  • Rails, How can I combine multiple model attributes to create a unique permalink using permalink_fu?

    - by Ranknoodle
    Can Permalink_fu combine 2 or more model attributes to create a unique permalink? Let's say I have a Business Model, this model contains :name, :address, :phone, :city, :state, :country etc. attributes. Right now I have permalink set up in this model only for :name has_permalink :name So I would get "/biz/name". However I would like to combine the Business name, city, and a incremental number if there are more than 1 location in the city for that business. For example I would like to use: "/biz/joes-coffee-shack-chicago" for the permalink or if a multple location business "/biz/starbucks-chicago-92" Is this possible with the current permalink_fu plugin or some fork of permalink_fu? Or will this require some modification to the permalink_fu plugin?

    Read the article

  • Using - Instead of + in WordPress Search Permalink

    - by poer
    Options +FollowSymLinks RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]+ /(#[^?& ]*)??([^& ]*&)?s=([^& ]+)[^ ]* HTTP/ RewriteRule ^$ http://wordpressblog.com/search/%3? [R=301,L] Currently I use the above .htaccess mod_rewrite rule to convert default WordPress search permalink: http://wordpressblog.com/?s=key+word into nice permalink like this: http://wordpressblog.com/search/key+word My question is: What part of the mod_rewrite rule above that I need to change to get a nicer permalink like this one: http://wordpressblog.com/search/key-word.html Thanks.

    Read the article

  • Wordpress Custom Type permalink containing Taxonomy slug

    - by treznik
    I'm trying to create a permalink pattern for a Custom Type, that includes one of its taxonomies. The taxonomy name is known from the start (so I'm not trying to add or mix all of its taxonomies, just a specific one), but the value will by dynamic, of course. Normally, the Custom Type permalink is built using the rewrite arg with the slug param, but I don't see how I could add a dynamic variable in there. http://codex.wordpress.org/Function_Reference/register_post_type I'm guessing a custom solution is required, but I'm not sure what the best unintrusive approach would be. Is there a known practice for this or has anyone built something similar recently? I'm using WP 3.2.1 btw.

    Read the article

  • seed-fu not working on winxp

    - by cbrulak
    I have seed-fu installed on my mac book, no problems. But I can install it fine on winxp but when I run it, I get: Don't know how to bulid task db:seed I checked my installed directory (c:\ruby\libs) and it appears to be there. Any ideas?

    Read the article

  • Attachment Fu error on MAC OS X and Ubuntu 9.10

    - by kgpdeveloper
    Greetings. I am encountering an issue with attachment fu and s3. Details: Production server - Ubuntu - imagemagick, rmagick aws-s3 gems are installed . Error starting app: vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb:173:in `included': undefined method `symbolize_keys' for nil:NilClass (NoMethodError) See: http://github.com/technoweenie/attachment_fu/blob/master/lib/technoweenie/attachment_fu/backends/s3_backend.rb Has anyone encountered this? It seems that even with the config/amazon_s3.yml, the YAML file is not read.

    Read the article

  • Create a permalink with Javascript

    - by Jon Romero
    I have a textbox where a user puts a string like this: "hello world! I think that __i__ am awesome (yes I am!)" I need to create a correct url like this: hello-world-i-think-that-i-am-awesome-yes-i-am How can be done using reg expressions? Also, is it possible to do it with Greek (for example)? "Ge?a s?? ??sµe" turns to geia-sou-kosme In other programming languages (python/ruby) I am using a translation array. Should I do the same here?

    Read the article

  • How to parse out base file name using Script-Fu

    - by ongle
    Using Gimp 2.6.6 for MAC OS X (under X11) as downloaded from gimp.org. I'm trying to automate a boring manual process with Script-Fu. I needed to parse the image file name to save off various layers as new files using a suffix on the original file name. My original attempts went like this but failed because (string-search ...) doesn't seem to be available under 2.6 (a change to the scripting engine?). (set! basefilename (substring filename 0 (string-search "." filename))) Then I tried to use this information to parse out the base file name using regex but (re-match-nth ...) is not recognized either. (if (re-match "^(.*)[.]([^.]+)$" filename buffer) (set! basefilename (re-match-nth orig-name buffer 1)) ) And while pulling the value out of the vector ran without error, the resulting value is not considered a string when it is passed into (string-append ...). (if (re-match "^(.*)[.]([^.]+)$" filename buffer) (set! basefilename (vector-ref buffer 1)) ) So I guess my question is, how would I parse out the base file name?

    Read the article

  • New Web Comic: Code Monkey Kung Fu

    - by Dane Morgridge
    It’s been something I’ve wanted to do for quite some time and decided it was finally time. Yesterday, I launched a new web comic “Code Monkey Kung Fu”. After being a programer for more than ten years, I’ve come across quite a few hilarious situations and will be drawing on them for inspiration. I also have a four kids, so they will probably produce a lot as well. My plan is to release on Tuesdays with additional comics mixed in on occasion. I hope you enjoy! http://www.codemonkeykungfu.com

    Read the article

  • Rewriting URL to get Wordpress "permalink" type URL

    - by user1472575
    I would like my users to enter http://mywebsite.com/the-name-of-my-post and have the following execute: http://mywebsite.com/Default.aspx#&&the-name-of-my-post ...which is what the ScriptManager generates at runtime. I have created an ASP.NET site to replace a Wordpress site that creates "permalinks". This site was around for about 2 years so there are lots of bookmarks and references to these "permalinks" on the search engines etc. Also are there any modules I have to include in my website to get this to work? Is there any configuration that I have to ask my hosting company to make so that this works?

    Read the article

  • does not boot after install, my troubleshooting and google fu have failed me

    - by chris
    I can only get an install to "stick" if I use shred to zerofill my drive first. Otherwise, when I install ubuntu or lubuntu 12.04, I will get "grub rescue: out of disk". With the aforementioned (completely default) install on top of a zerofilled drive, then rebooting after installing updates will tell me there is no operating system. I don't even get to grub. Installing on top of the failed install, while choosing "erase ubuntu 12.04 and reinstall", I get the grub rescue: out of disk error. The hard drive has been repeatedly tested and does not have any read or write errors. I've used check disk for errors on the pen drive I'm installing from and it comes up clean as well. The system is an inspiron 6000, with 1gb ram and a 250 gb hard drive. I'm typing this from a live cd on the same machine. What gives?

    Read the article

  • rails routes for permalink with namespaced class

    - by David
    this one in my routes works perfectly: map.connect ':permalink', :controller = 'pages', :action = 'show' for this class: class PagesController < BackendController and on /xxx/pages it is shown like this: <%= link_to "#{item.link_name}", {:controller = :pages, :action = :show, :permalink = item.permalink} % which will generate a link like "how-to-create-permalinks". but i decided to move the PagesController into a subdirectory so the class is now written like so: class Backend::PagesController < BackendController But how does the route look like now? And how do i display it on the template so it links using the permalink? Thanks!

    Read the article

  • background-fu pluggin unable to run ./script/generate background

    - by Viola
    I'm following this rdoc: http://rdoc.info/projects/ncr/background-fu and can't run ./script/generate background after installing background-fu as a Rails plugin: ./script/plugin install git://github.com/ncr/background-fu.git I'm getting following error: Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- job (MissingSourceFile) Am I missing something?

    Read the article

  • Get page permalink and title outside the loop in wordpress

    - by Aakash Chakravarthy
    Hello, How to Get page permalink and title outside the loop in wordpress. I have a function like function get_post_info(){ $post; $permalink = get_permalink($post->ID); $title = get_the_title($post->ID); return $post_info('url' => $permalink, 'title' => $title); } when this function called within the loop, it returns the post's title and url. When it is called outside the loop. It is not returning the current page's title and url. When called in home page it should return the home page's title and url How to get like this ? instead this function returns the latest posts title and url

    Read the article

  • Permalink Ajax Issue Wordpress

    - by Soumya
    function AjaxRequest(section,divName) { var pageurl = fullPath+"/ajaxrequest.php?section="+section+"&divName="+divName; //alert(pageurl); var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(divName).innerHTML=''; document.getElementById(divName).innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET",pageurl,true); xmlhttp.send(); } I have a Code like that in wordpress which is calling a page using ajax. It is working fine when the page are coming in ID like ?page_id=37 but stop working when I am activating Permalink like /overview/ajaxpage. I am getting 404 pafe error on xmlhttp.readyState. Can any one help me to solve it. I know its a permalink Problem probably this code of ajax is not sufficient for transmuting Permalink.

    Read the article

  • Wordpress FORCE UPDATE of permalink settings

    - by Scott B
    I've been having issues on creating new wordpress blogs where I'm setting permalinks via script on theme activation. However, even though they appear to be correct when I check the permalink settings in WP, my new pages are throwing 404 errors. The only fix I've found is that I have to go back to permalink options and click "Save Changes", even though, according to the display, I've made no changes to need to save... I'm setting permalinks to /%postname%/ Here's how I'm doing it. if(get_option('permalink_structure')==""){update_option('permalink_structure', '/%postname%/');} That script gets run when my theme is activated. Any ideas why it only partially does the job?

    Read the article

  • Getting Facebook Posts Permalink from Facebook Graph API Search

    - by Alexia
    I want to use the Facebook Graph API to search the public status updates concerning a keyword. For example, this works great: http://graph.facebook.com/search?q=obama&type=post It shows me all the posts with the word "obama" in it. If the post is a picture, it actually returns a field called "link" which is the permalink to the picture on the actual Facebook website, in the user's profile. Which is exactly what I want, but for pictures. But if the post in question is just a status update, i.e. just text, all it returns is the 3 fields: message, created_time, and updated_time. How do I view this actual status update on www.facebook.com? I realize I can view it on graph.facebook.com in JSON format, but I want to actually be able to show the permalink to the status update, or post. The final result I would like to retrieve might look something like this: http://www.facebook.com/[user id]/posts/[post id] With the [user id] and [post id] fields swapped out with the actual IDs, obviously. TIA!

    Read the article

  • Change post permalink structure on WordPress to use custom taxonomy

    - by TiuTalk
    Hi there! I want to change the post permalink schema on my WordPress 3.0-beta1 to use my new custom taxonomy. Today I can use /%category%/%postname%/ and the /my-category/my-post/ URL, that's nice but I need to use another taxonomy instead "category" one. I tried to use /%acervo%/%postname%/ but my URLs came with %acervo% on the URL instead the name of the "Acevo" (my taxonomy name) wich the post belongs to. I found something related to WP_Rewrite but without sucess...

    Read the article

  • Implicit and Explicit implementations for Multiple Interface inheritance

    Following C#.NET demo explains you all the scenarios for implementation of Interface methods to classes. There are two ways you can implement a interface method to a class. 1. Implicit Implementation 2. Explicit Implementation. Please go though the sample. using System;   namespace ImpExpTest { class Program { static void Main(string[] args) { C o3 = new C(); Console.WriteLine(o3.fu());   I1 o1 = new C(); Console.WriteLine(o1.fu());   I2 o2 = new C(); Console.WriteLine(o2.fu());   var o4 = new C(); //var is considered as C Console.WriteLine(o4.fu());   var o5 = (I1)new C(); //var is considered as I1 Console.WriteLine(o5.fu());   var o6 = (I2)new C(); //var is considered as I2 Console.WriteLine(o6.fu());   D o7 = new D(); Console.WriteLine(o7.fu());   I1 o8 = new D(); Console.WriteLine(o8.fu());   I2 o9 = new D(); Console.WriteLine(o9.fu()); } }   interface I1 { string fu(); }   interface I2 { string fu(); }   class C : I1, I2 { #region Imicitly Defined I1 Members public string fu() { return "Hello C"; } #endregion Imicitly Defined I1 Members   #region Explicitly Defined I1 Members   string I1.fu() { return "Hello from I1"; }   #endregion Explicitly Defined I1 Members   #region Explicitly Defined I2 Members   string I2.fu() { return "Hello from I2"; }   #endregion Explicitly Defined I2 Members }   class D : C { #region Imicitly Defined I1 Members public string fu() { return "Hello from D"; } #endregion Imicitly Defined I1 Members } }.csharpcode, .csharpcode pre{ font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em;}.csharpcode .lnum { color: #606060; }Output:-Hello C Hello from I1 Hello from I2 Hello C Hello from I1 Hello from I2 Hello from D Hello from I1 Hello from I2 span.fullpost {display:none;}

    Read the article

  • Rails: redirect_to :controller=>'tips', :action => 'show', :id => @tip.permalink

    - by john
    hi, I tried to redirect rails to show action by passing controller, action, and params. However, rails ignores the name of action totally! what I got is http://mysite/controllername/paramId so i have error message.... here is the action code I used: def update @tip = current_user.tips.find(params[:id]) @tip.attributes = params[:tip] @tip.category_ids = params[:categories] @tip.tag_with(params[:tags]) if params[:tags] if @tip.save flash[:notice] = 'Tip was successfully updated.' redirect_to :controller=>'tips', :action => 'show', :id => @tip.permalink else render :action => 'edit' end end

    Read the article

  • PHP, javascript, single quote problems with IE when passing variable from ajax post to javascript fu

    - by Mattis
    Hi! I have been trying to get this to work for a while, and I suspect there's an easy solution that I just can't find. My head feels like jelly and I would really appreciate any help. My main page.php makes a .post() to backend.php and fetches a list of cities which it echoes in the form of: <li onclick="script('$data');">$data</li> The list is fetched and put onto the page via .html(). My problem occurs when $data has a single quote in it. backend.php passes the variable just fine to page.php but when i run html() it throws a javascript error (in IE, not FF obviously); ')' is expected IE parses the single quote and messes up the script()-call. I've been trying to rebuild the echoed string in different ways, escaping the 's on the php side and/or on the javascript side - but in vain. Do I have to review the script in total? page.php $.post("backend.php", {q: ""+str+""}, function(data) { if(data.length >0) { $('#results').html(data); } backend.php while ($row = $q->fetch()) { $city = $row['City']; // $city = addslashes($row['City']); // $city = str_replace("'","&#39;",$row['City']); echo "<li onclick=\"script('$city');\">".$city."</li>"; }

    Read the article

  • Unhandled Exception with c++ app on Visual Studio 2008 release build - occurs when returning from fu

    - by Rich
    Hi, I have a (rather large) application that I have written in C++ and until recently it has been running fine outside of visual studio from the release build. However, now, whenever I run it it says "Unhandled exception at 0x77cf205b in myprog.exe: 0xC0000005: Access violation writing location 0x45000200.", and leads me to "crtexe.c" at line 582 ("mainret = main(argc, argv, envp);") if I attempt to debug it. Note that this problem never shows if I run my debug executable outside of visual studio, or if I run my debug or release build within visual studio. It only happens when running the release build outside of visual studio. I have been through and put plenty of printfs and a couple of while(1)s in it to see when it actually crashed, and found that the access violation occurs at exactly the point that the value is returned from the function (I'm returning a pointer to an object). I don't fully understand why I would get an access violation at the point it returns, and it doesn't seem to matter what I'm returning as it still occurs when I return 0. The point it started crashing was when I added a function which does a lot of reading from a file using ifstream. I am opening the stream every time I attempt to read a new file and close it when I finish reading it. If I keep attempting to run it, it will run once in about 20 tries. It seems a lot more reliable if I run it off my pen drive (it seems to crash the first 3 or 4 times then run fine after that - maybe it's due to its slower read speed). Thanks for your help, and if I've missed anything let me know.

    Read the article

  • advanced Visual Studio kung-fu test -- Calling functions from the Immediate Window during debugging

    - by kizzx2
    I see some related questions have been asked, but they're either too advanced for me to grasp or lacking a step-by-step guide from start to finish (most of them end up being insider talk of their own experiment results). OK here it is, given this simple program: #include <stdio.h> #include <string.h> int main() { FILE * f; char buffer[100]; memset(buffer, 0, 100); fun(); f = fopen("main.cpp", "r"); fread(buffer, 1, 99, f); printf(buffer); fclose(f); return 0; } What it does is basically print itself (assume file name is main.cpp). Question How can I have it print another file, say foobar.txt without modifying the source code? It has something to do with running it through VS's, stepping through the functions and hijacking the FILE pointer right before fread() is called. No need to worry about leaking resources by calling fclose(). I tried the simple f = fopen("foobar.txt", "r") which gave CXX0017: Error: symbol "fopen" not found Any ideas? Edit I found out the solution accidentally on Debugging Mozilla on Windows FAQ. The correct command to put into the Immediate Window is f = {,,MSVCR100D}fopen("foo.txt", "r") However, it doesn't really answer this question: I still don't understand what is going on here. How to systematically find out the {,,MSVCR100D} part for any given method? I know the MSVCR version changes from system to system. How can I find that out? Could anyone explain the curly brace syntax, especially, what are those two commas doing there? Are there more hidden gems using this syntax?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >