Tech Forum Network

Programming, technical solutions and hot scripts

Posts Tagged by hook

GitHub Web Hook POST incomplete and broken up

September 29, 2014 Posted by forumadmin under TechQns
Comments off

So I setup a web hook on GitHub for one of my repos, for when pushes are made to it. I have a Django application running live. I set up a URL for the web hook to post to, and when it recieves the post from GitHub it just prints out the result to the […]

Create a c++ dll with inline assembly

September 13, 2014 Posted by forumadmin under TechQns
Comments off

What I am trying to is is make a c++ dll file with a mid function hook in it, to watch when a value is changed in a game(Plants Vs Zombies). Now my problem is when the inline assembly is included via a header, when the .dll is built it gives an error :-1: error: […]

WordPress hook attachment_fields_to_save doesnt effect attachment data on file upload

September 11, 2014 Posted by forumadmin under TechQns
Comments off

I’m trying to find out where WordPress initially sets the post title of an attachment. After stumbling through the source I found a hook named attachment_fields_to_save which – according to the documentation – “provides default values to the post_title”. Seems to be the right spot, BUT… For some reason I can’t use this hook to […]

how to configure Pre-commit hook in windows for some specific values (BugID)

August 8, 2014 Posted by forumadmin under TechQns
Comments off

I want to integrate TeamID in log messages using pre-commit hook.Currently ,we are not using any kind of bug-tracking tool. I have someTeamIDs and want User to enter teamID (This teamID should be valid ) . I Have tried using property of svn for Bugtraq but dont know how to validate those TeamIDs.Can I compare […]

trampoline function crashes

August 1, 2014 Posted by forumadmin under TechQns
Comments off

I wrote a simple Hook function using some examples I saw here, and it works. I managed to redirect CreateProcess to a trampoline function that modified some parameters, than gave control back to CreateProcess. I didn’t like it because I used pop and push in order to do this when I could simply refer to […]

WooCommerce Email style – remove default styling

July 3, 2014 Posted by forumadmin under TechQns
Comments off

When generating customer emails, WooCommmerce defines a set of tags here for which they apply a default hardcoded style. /** * style_inline_tags function. * * @access public * @param array $tags * @return array */ function style_inline_tags($tags) { return array_unique( array_merge( $tags, array( ‘h1′, ‘h2′, ‘h3′, ‘a’, ‘img’ ) ) ); } I need to […]

Is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query

May 2, 2014 Posted by forumadmin under TechQns
Comments off

Is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query? I had to do it as I am adding an extra option in the input query for an additional functionality in postgresql. So I have the check the input query and […]

Moving up the DOM with hooks for a php based platform

March 31, 2014 Posted by forumadmin under TechQns
Comments off

I’m trying to build my first plugin for a platform called Ushahidi. Ushahidi is a PHP based platform that uses the Kohana framework. I was looking at all the hooks available to me here: https://wiki.ushahidi.com/display/WIKI/Plugin+Actions My goal is to add meta tags into the header of certain pages to help make the website more searchable […]

Clear cache when a scripts has changes – WordPress

February 24, 2014 Posted by forumadmin under TechQns
Comments off

I am using WP Super Cache plugin. I want to clear cache when a script is edited without deactive this plugin. How can I do this?   Asked By – nandophillips        Read Answers     0   

Simple API Hook for prevent file deletion?

December 28, 2013 Posted by forumadmin under TechQns
Comments off

I would like to intercept when the user deletes a file on ANY directory by hooking the needed API function(s) with the availability of asking a simple boolean question in a mesagebox “Really Would you like to Delete this file?“, the question is an example to express that I would like to have control on […]

Checking for buddypress from a theme

December 24, 2013 Posted by forumadmin under TechQns
Comments off

How can I check for buddypress from a theme? I’ve found this page for BP Plugin development but this action never gets loaded if I hook from a theme. Why does it not work? P.S. I need call some BP’s functions from a theme, like: Show “BP’s Activity Stream” at specific places. What I mean […]

Content filter does not search drupal7

November 29, 2013 Posted by forumadmin under TechQns
Comments off

I have added a drop down of my courses title at the filter second of the drupal – admin – content area. http://www.XYZ.com/demo/admin/content But when I select any of the title and hit Filter nothing gets appear. The data which showed previously it shows again, nothing happens really. My code for the add filter drop […]

Is set single step trap available on win 7?

April 29, 2013 Posted by forumadmin under TechQns
Comments off

I was doing with a so called ‘seh hooking’. Actually it changes permission of region of memory and catches the exception when it gets accessed, so it can hook the function. It uses the single step trap which looks like: info->ContextRecord->EFlags |= 0x100; to resume the protection to PAGE_NOACCESS. The app run well on win […]

Replace text in a wordpress file with a hook

April 22, 2013 Posted by forumadmin under TechQns
Comments off

I am trying to replace some text in a woocommerce file so i need to create a hook in my functions.php file so that when woocommerce updates, it won’t harm my site by reverting back to the original code. I’m trying to replace this part of the code: <h3><?php the_title(); ?></h3> with this: <div class=”caption”><h5><?php […]

How to hook validate_username (or sanitize_user) in WP?

January 17, 2013 Posted by forumadmin under Wordpress
Comments off

I am new to wordpress and I am just learning it. How to hook validate_username or sanitize_user functions? I do not want to call them at all, I want to change them for my particular plugin. Here is the full story: My problem is that I do not know how to change existing WP functions […]

Error:fatal: Not a git repository: . when I use gitolite Hooks post-receive to auto deploy code

November 16, 2012 Posted by forumadmin under TechQns
Comments off

My English is not very good. Please bear with me. I had search this question on stackoverflow and google.But also can’t solve this question. I just want to build a auto deploy enviroment through git hooks.But it’s doesn’t work. I use Ubuntu 12.04 server as server on one computer,I call it PC-Ser. And I use […]

Uninterruptable process in Windows(or Linux)?

September 15, 2012 Posted by forumadmin under TechQns
Comments off

Is there any way to make a program that cannot be interrupted (an uninterrupted program)? By that, I mean a process that can’t be terminated by any signal, kill command, or any other key combinations in any System: Linux, windows etc. First, I am interested to know whether it’s possible or not. And if yes, […]

Function not attaching to wp_footer hook

July 16, 2012 Posted by forumadmin under Wordpress
Comments off

I’m having some issues getting this functionality to work. It must be something I’m overlooking. This is my code: if ( is_page_template(‘template-thankyou.php’) ) { function eh_add_product_tracking_code(){ $meta_key = ‘product_code'; $meta_value = get_post_meta($post->ID, $meta_key, true); return $meta_value; } add_action(‘wp_footer’, ‘eh_add_product_tracking_code’); } Basically, I’m trying to add a custom field named product_code to the footer of the […]

WordPress Plugin Source Code(Resolved)

July 4, 2012 Posted by forumadmin under PHP
Comments off

I am trying to write a hook for s2Member: I have trouble with the following code: eval (‘foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;’); do_action (“ws_plugin__s2member_after_paypal_notify”, get_defined_vars ()); unset ($__refs, $__v); /* Unset defined __refs, __v. */ What does eval (‘foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;’); do, especially &$$__v? I cant find the source code for ws_plugin__s2member_after_paypal_notify? Is this supposed to be a class? How can […]

change Link at WordPress behind the shown IP on the comment list – column_author

July 1, 2012 Posted by forumadmin under PHP
Comments off

Hi Cracks and Professions, at the Dashboard in WordPress we had a list of all given comments which are shown at yourDomain.com/wp-admin/edit-comments.php We can see all Information about the comment author the first column – as $comment_author There’s a shown URL behind the author IP, wich i had to change – i think so, best […]

Writing a git post-receive hook to deal with a specific branch

September 8, 2011 Posted by forumadmin under TechQns
Comments off

Here’s my current hook in a bare repo that lives in the company’s server: git push origin master This hooks pushes to Assembla. What i need is to push only one branch (master, ideally) when someone pushes changes to that branch on our server, and ignore pushes to other branches. Is it possible to select […]

CLR profiler: issue in using DefineAssemblyRef

July 28, 2011 Posted by forumadmin under TechQns
Comments off

I want to write a CLR profiler to hook our application function with GetILFunctionBody/SetILFunctionBody. I want to use DefineAssemblyRef to import our c# dll (for use in IL code) in this code DefineAssemblyRef always return True? Does my dll have to be signed? Does it need to be installed in the Global Assembly Cache (GAC)? […]

Not able to detect branch from Git post-receive hook

May 12, 2011 Posted by forumadmin under TechQns
Comments off

I’ve got a post receive hook setup on the remote repo that tries to determine the branch name of the incoming push as follows: $branch = `git rev-parse –abbrev-ref HEAD` What i’m finding, though, is that no matter what branch I push from my $branch variable gets set with ‘master’. Any ideas?   Asked By […]

Drupal Hooks (hook_form_alter)

March 16, 2011 Posted by forumadmin under TechQns
Comments off

I’ve a question about Hooks. Being kind of new to Drupal I haven’t had much experience with hooks but a friend of mine suggested to get familiar with it and learn it to solve one of my problems on my site. The thing is, that I have a module fbconnect which I use for users […]

Post-save callback?

March 15, 2011 Posted by forumadmin under TechQns
Comments off

How do I execute a function every time a node is being updated? I tried to use hook_nodeapi, but it looks like that the hook is removed from Drupal 7. What I want to do is, add a new field to my content type called ‘main image (bool)’ to let the admin set a main […]

What does WPF use to capture mouse and keyboard input?

February 17, 2011 Posted by forumadmin under TechQns
Comments off

I globally (system-wide) filter certain mouse clicks using SetWindowsHookEx and WH_MOUSE_LL. The problem is it doesn’t work for WPF applications (all WPF applications detect mouse clicks whether or not I have instructed the system to ignore these clicks). I’ve already asked a similar question here, but I made an assumption that WPF uses DirectInput instead […]

Adding console.log to every function automatically

February 17, 2011 Posted by forumadmin under TechQns
Comments off

Is there a way to make any function output a console.log statement when it’s called by registering a global hook somewhere (that is, without modifying the actual function itself) or via some other means?   Asked By – JRL        Read Answers     0   

How Can I Hook a Youtube Video (Flash Player?) To Slow Down Playback?

January 29, 2011 Posted by forumadmin under TechQns
Comments off

The only good software I know which can decelerate and accelerate the playback of a YouTube video in any browser without first downloading it (because that would be cumbersome), is Enounce MySpeed. Unfortunately, this software is not free, and my trial version ran out. I was playing around with its registry settings and noticed a […]

How to get the word under the cursor in Windows?

January 12, 2011 Posted by forumadmin under TechQns
Comments off

I want to create a application which gets the word under the cursor (not only for text fields), but I can’t find how to do that. Using OCR is pretty hard. The only thing I’ve seen working is the Deskperience components. They support a ‘native’ way, but I they cost a lot. Now I’m trying […]

Git pre-push hooks

November 16, 2010 Posted by forumadmin under TechQns
Comments off

I would like to run a unit-tests before every git push and if tests fails, cancel the push, but I can’t even find pre-push hook, there is pre-commit and pre-rebase only.   Asked By – sheepwalker        Read Answers     0   

Is there any git hook for pull?

November 15, 2010 Posted by forumadmin under TechQns
Comments off

I need to perform some actions (prepare gettext *.mo message files) on my project everytime I run git pull. Is there any suitable git hook, which I could use for this purpose please?   Asked By – msgre        Read Answers     0   

How to specify which SSH key to use within git for git push in order to have gitorious as a mirror?

August 16, 2010 Posted by forumadmin under TechQns
Comments off

I have a project hosted on git.debian.org (alioth) and I’d like to configure a post-receive hook to update a mirror of the repository on http://gitorious.org I suppose I’ll have to use git push –mirror gitorious Now, I’ll need to have Alioth authorized on gitorious for the push to succeed. How do I do that? I […]

In Git, how can I write the current commit hash to a file in the same commit

August 9, 2010 Posted by forumadmin under TechQns
Comments off

I’m trying to do a fancy stuff here with Git hooks, but I don’t really know how to do it (or if it’s possible). What I need to do is: in every commit I want to take its hash and then update a file in the commit with this hash. Any ideias?   Asked By […]

Anyone get mach_inject working on snow leopard?

May 19, 2010 Posted by forumadmin under TechQns
Comments off

Project is now on github and here is the link to my issue I successfully compiled the whole thing and able to run rejector and rejectee separately. But the injector will crash the injectee when injecting code to the target process. mach_inject_test_injectee.app ‘s standard output: mach error on bundle load (os/kern) successful mach error on […]

Git commit hooks – global settings

February 19, 2010 Posted by forumadmin under TechQns
Comments off

I’ve written a Git post-commit hook and it works correctly. However, I want to add this hook to apply to all current (and future) git repositories I am working on. I tried adding the hook to my ~/.git/hooks/ instead of in the hooks directory in the project directory, however, this did not seem to work. […]

Linux Kernel: System call hooking example

January 20, 2010 Posted by forumadmin under TechQns
Comments off

I’m trying to write some simple test code as a demonstration of hooking the system call table. “sys_call_table” is no longer exported in 2.6, so I’m just grabbing the address from the System.map file, and I can see it is correct (Looking through the memory at the address I found, I can see the pointers […]

Hooking DirectX EndScene from an injected DLL

January 3, 2010 Posted by forumadmin under TechQns
Comments off

I want to detour EndScene from an arbitrary DirectX 9 application to create a small overlay. As an example, you could take the frame counter overlay of FRAPS, which is shown in games when activated. I know the following methods to do this: Creating a new d3d9.dll, which is then copied to the games path. […]

How can I prevent Subversion commits without comments?

December 18, 2009 Posted by forumadmin under TechQns
Comments off

Does anybody know how to prevent commits to a Subversion code repository when there is no commit comment entered?   Asked By – user234518        Read Answers     0   

how do aim bots in fps games work?

November 17, 2009 Posted by forumadmin under TechQns
Comments off

I was curious if anyone had any experience/knowledge about aim bots in online FPS games such as Counter-Strike. I am curious and would like to learn more about how the cursor knows how to lock on to an opposing player. Obviously if I wanted to cheat I could go download some cheats so this is […]

Useful Mercurial Hooks

November 10, 2009 Posted by forumadmin under TechQns
Comments off

What are some useful Mercurial hooks that you have come across? A few example hooks are located in the Mercurial book: acl bugzilla notify check for whitespace I personally don’t find these very useful. I would like to see: Reject Multiple Heads Reject Changegroups with merges (useful if you want users to always rebase) Reject […]

Finding a 3rd party QWidget with injected code & QWidget::find(hwnd)

July 23, 2009 Posted by forumadmin under TechQns
Comments off

Hey, I have a Qt Dll wich I inject into a third-party Application using windows detours library: if(!DetourCreateProcessWithDll( Path, NULL, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED, NULL, NULL, &si, &pi, “C:\\Program Files\\Microsoft Research\\Detours Express 2.1\\bin\\detoured.dll”, “C:\\Users\\Dave\\Documents\\Visual Studio 2008\\Projects\\XOR\\Debug\\XOR.dll”, NULL)) and then I set a system-wide hook to intercept window creation: HHOOK h_hook = ::SetWindowsHookEx(WH_CBT, (HOOKPROC)CBTProc, […]

C# How to find if an event is hooked up

July 15, 2009 Posted by forumadmin under TechQns
Comments off

I want to be able to find out if an event is hooked up or not. I’ve looked around, but I’ve only found solutions that involved modifying the internals of the object that contains the event. I don’t want to do this. Here is some test code that I thought would work: // Create a […]

Share common / useful SVN pre-commit hooks

May 19, 2009 Posted by forumadmin under TechQns
Comments off

What are some common and/or useful pre-commit hooks for SVN?   Asked By – powtac        Read Answers     0   

How can I hook Windows functions in C/C++?

May 17, 2009 Posted by forumadmin under TechQns
Comments off

If I have a function foo() that windows has implemented in kernel32.dll and it always returns true, can I have my program: “bar.exe” hook/detour that Windows function and make it return false for all processes instead? So if my svchost, for example, calls foo(), it will return false instead of true. The same action should […]

Is there a Subversion Checkout Hook or something similar?

April 30, 2009 Posted by forumadmin under TechQns
Comments off

I’m using a subversion repository and I want to know whenever somebody asks my repository for a checkout; like a ‘svn co’ or an ‘svn up’. Is there a hook or some other method that I can use so that a script is run, or email sent, whenever somebody requests information from my svn server? […]

git push email notification

February 16, 2009 Posted by forumadmin under TechQns
Comments off

How do I configure the appropriate git hook to send a summary email whenever a set of changes is pushed to the upstream repository?   Asked By – Head        Read Answers     0   

What is meant by the term "hook" in programming?

January 21, 2009 Posted by forumadmin under TechQns
Comments off

I recently heard the term “hook” while talking to some people about a program I was writing. I’m unsure exactly what this term implies although I inferred from the conversation that a hook is a type of function. I searched for a definition but was unable to find a good answer. Would someone be able […]

Using SVN post-commit hook to update only files that have been commited

January 15, 2009 Posted by forumadmin under TechQns
Comments off

I am using an SVN repository for my web development work. I have a development site set up which holds a checkout of the repository. I have set up an SVN post-commit hook so that whenever a commit is made to the repository the development site is updated: cd /home/www/dev_ssl /usr/bin/svn up This works fine […]

How can I hook into Perls print?

December 22, 2008 Posted by forumadmin under TechQns
Comments off

Here’s a scenario. You have a large amount of legacy scripts, all using a common library. Said scripts use the ‘print’ statement for diagnostic output. No changes are allowed to the scripts – they range far and wide, have their approvals, and have long since left the fruitful valleys of oversight and control. Now a […]

How to require commit messages in VisualSVN server?

October 29, 2008 Posted by forumadmin under TechQns
Comments off

We’ve got VisualSVN Server set up as our Subversion server on Windows, and we use Ankhsvn + TortoiseSVN as clients on our workstations. How can you configure the server to require commit messages to be non-empty?   Asked By – Ben Collins        Read Answers     0   

Next Page »
Tech Forum Network powered by WordPress and The Clear Line Theme