w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to get session variables in wordpress plugins
// On your plugin functions.php function register_session() { if (!session_id()) session_start(); } add_action('init', 'register_session'); function your_function() { //Here you can unset your session variabl } add_action('wp_logout', 'your_function'); //Now you can use $_SESSION['tag'] = $_POST['val'];

Categories : PHP

Php errors not logging for wordpress plugins
As the Codex says: WP_DEBUG_LOG is companion to WP_DEBUG that causes all errors to also be saved to a debug.log log file inside the /wp-content/ directory. This is useful if you want to review all notices later or need to view notices generated off-screen (e.g. during an AJAX request or wp-cron run). Edit your wp-config.php file and add the following definition (if not already present): define('WP_DEBUG_LOG', true); This will make Wordpress log the errors to /wp-content/debug.log. However, if you want to change the location of the debug.log file, you can use the following work-around: if (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG) { ini_set( 'error_log', WP_CONTENT_DIR.'/foo/debug.log' ); //modify accordingly } Hope this helps!

Categories : PHP

Wordpress themes and plugins not work
Make sure you have <?php wp_head(); ?> </head> in your header.php file inside the active theme folder and <?php wp_footer(); ?> </body> in your footer.php file inside the active theme folder. Not having those would stop the plugins from running correctly.

Categories : Wordpress

Wordpress asking for my FTP credentials to install plugins
From the first hit on Google: WordPress asks for your FTP credentials when it can't access the files directly. This is usually caused by PHP running as the apache user (mod_php or CGI) rather than the user that owns your WordPress files. This is rather normal in most shared hosting environments - the files are stored as the user, and Apache runs as user apache or httpd. This is actually a good security precaution so exploits and hacks cannot modify hosted files. You could circumvent this by setting all WP files to 777 security, but that means no security, so I would highly advise against that. Just use FTP, it's the automatically advised workaround with good reason.

Categories : Wordpress

wordpress plugins using Jquery not functioning
you have jquery included twice, dunno if this is necessary you are missing cufon, add this after jquery: <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/cufon/1.09i/cufon-yui.js"/>

Categories : Jquery

Style messed up in various wordpress plugins
In your http://ankit-arora.com/wp-content/themes/manifest_v1.1/style.css change line 346 to: #coreContent li{ list-style: none; margin: 0; } Or perhaps better add the css to class bigcard. I can't find it on your page anymore..there was a template.css file: li.bigcard { list-style: none; margin: 0; } You should learn to work with chrome developer-tools or firebug. There you see the actual style the element gets and can edit it in browser for preview.

Categories : CSS

wordpress access widgets or plugins outside of admin and with php
my guess would be the widget function which looks like it takes args and an instance from Wordpress, so you would have to populate those variables with the right information for your Wordpress (title etc). It also looks like you need to call WP_Cal_Active either before or after the widgit function.

Categories : PHP

How to properly encode Wordpress plugins with ioncube
To properly encode the Worpdress plugin file, open up the main plugin file. For example the main plugin file is plugger.php Remove the Wordpress header comment: /* Plugin Name: plugger */ Encode the files using ioncube. Copy the encoded files into the Wordpress plugin directory. Then rename the main plugin file, for example plugger-file.php. Then create a new file, this will be the main plugin file plugger.php. Inside plugger.php add the Wordpress header comments so that Wordpress will recognize the plugin then include the plugger-file.php <?php /* Plugin Name: plugger */ include_once('plugger.php');

Categories : PHP

jQuery lightbox plugins not working (Wordpress)
Did you check the console for errors? I can see these two: Uncaught TypeError: Cannot call method 'getElementsByClassName' of null new.stevenspiel.com/compositions/:137 Uncaught TypeError: Object [object Object] has no method 'fancybox' You should fix this error first. If you look at line 137, you see this: var $body = document.body , $menu_trigger = $body.getElementsByClassName('menu-trigger')[0]; looks like you have a "," instead of a ";" to end the first line.

Categories : Jquery

WordPress on EC2 Requires FTP Credentials to Install Plugins
I found the answer to this question at Stephen White's blog post. In a nutshell, I have to create custom rules for Port Ranges 20-21 and some additional ports in my EC2 instance FW install and configure the FTP server vsftpd create and configure an FTP user and put my FTP setting in the wp-config.php file This works very well for me now.

Categories : Wordpress

How can I use Multi Media Uploader in the WordPress Plugins?
Here is the example how you can use the wordpress multimedia uploader for more than one field or as many fields. The JS code and html code looks like this How it works Add upload_image_button class on each upload button on the basis of this class click function triggers to fetch the wordpress multimedia uploader , see i have used the prev() property to get the previous element to the clicked one formfieldID=jQuery(this).prev().attr("id"); and then i have assigned the image url returned by uploader to formfieldID <input id="upload_image1" type="text" name="upload_image1" value="<?php echo $upload_image1;?>" /> <input class="upload_image_button" type="button" value="Upload image 1" /> <input id="upload_image2" type="text" name="upload_image2" value="<?php

Categories : Javascript

How to create a customized catalina.jar?
I have did this by, extracting the source zip and imported it as a project in eclipse. Then added the following codes to request.java, to configure session cookie : protected void configureSessionCookie(Cookie cookie) { cookie.setMaxAge(-1); String contextPath = null; if(!connector.getEmptySessionPath() && getContext() != null) contextPath = getContext().getEncodedPath(); if(contextPath != null && contextPath.length() > 0) cookie.setPath(contextPath); else cookie.setPath("/"); if(isSecure()) cookie.setSecure(true); String domain = this.getServerName(); if (domain != null) { domain = domain.substring(domain.indexOf('.')+1); cookie.setDomain(domain); } } So that my cookie re

Categories : Eclipse

How to create a customized array from json file
The Address1, City, and ZipCode properties are inside an object that is an item of the Addresses array. Change $newrec = $decarr[$x]; To: $newrec = $decarr[$x]['Addresses'][0]; Or if you want, you could also add all addresses: for ($y = 0; $y < count($decarr[$x]['Addresses']); $y++) { $newrec = $decarr[$x]['Addresses'][$y]; ... $values[] = "('".$num."', '".$desc."', '".$freq."')"; }

Categories : PHP

TFS, how to create customized alerts for work items
This is not really possible, because alerts in TFS are event based. This means you can only get notification mails using board tools, when the work item was changed. In addition to this, not all date fields can be compared if equal a value, most just allow to check for "Changes", "Changes From" or "Change To". An alternative way would be a tool that is scheduled to run in the night, check the due dates and if equal today, then sent a mail. Unfortunately I have never seen a tool like this already published.

Categories : Tfs

how can i stop a function from adding a line break after it adds a readmore extension to a wordpress excerpt in a customized recent posts widget?
hi thanks for you input anpsmn. i got it to work by removing the anchor link from within the other anchor link thanks to your insight and replacing it with '...' its still a click able permalink by connecting it directly to the excerpt which is exactly what i needed =) im just preparing to style it with onhover css and a jsscrollpane scrollbar so i needed to be able to control the length of the title and excerpt with the ability to style the title and excerpt separately here is the new function code below the output to the page remained the same thanks =) //rpwp_excerpt function rpwp_excerpt($count){ $permalink = get_permalink($post->ID); $excerpt = get_the_content(); $excerpt = strip_tags($excerpt); $excerpt = substr($excerpt, 0, $count); $excerpt = substr($excerpt, 0, strripos($

Categories : PHP

What to create Customized-Android-ListView-with-Image-and-Text
Try following layout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="5dip" > <!-- ListRow Left sied Thumbnail image --> <ImageView android:id="@+id/imgLogo" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginBottom="5dp" android:layout_marginRight="5dip" android:padding="3dip" android:src="@drawable/ic_launcher" /> <!-- Repeat this layout number of times -->

Categories : Android

CakePHP: create action hooks for plugins
Yes there is. CakePHP Event System It works a lot like WordPress's hooks, but only better. You can register callbacks in different places, but easy way is to do this in the bootstrap.php of the plugin. When the application loads the plugin it can tell CakePHP to bootstrap it. This is done with this command. CakePlugin::loadAll(array(array('bootstrap'=>true,'routes'=>true)));

Categories : PHP

Error deploying to Heroku (DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins)
If you are trying to remove the plugin, you need to run rails plugin remove [your-plugin], not just delete the folder. Also, I believe heroku adds some plugins to your app, and it's possible that those are deprecated.

Categories : Ruby On Rails

Create a wordpress login form to a non-wordpress website
You can do this in 2 ways. Cookies Sessions After your login is validated you store the information in an cookie/session, you send the users to your wordpress website. And the login page, checks if the desired session/cookie is available and if yes you skip the login fase.

Categories : PHP

using login information in DNN portal A to login portal b?
It is not quite clear what you want. If you mean that site A is your DotNetNuke site and site B is a module inside DotNetNuke then you can get the username of the current signed in user by using the UserInfo object. For example, if you want to print the username you could use Razor to print it on the page like this: <body> <% Response.Write(UserInfo.Username); %> Again, this only works if Site B is a DNN module.

Categories : Asp Net

web and integrated wordpress or create web with wordpress
I would recommend you to run Wordpress and use a language plugin. WPML is the best I've used. Stay away from qTranslate since it'll be a mess if you want to uninstall it. I've heard some good about Ploylang but never used it myself. Wordpress is really easy to learn if you're a web developer.

Categories : Wordpress

Building Hadoop with Maven - "Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (create-testdirs)"
Found a solution. Do a sudo chown -R username parent-directory if you haven't already. Now try, mvn install -DskipTests. Everything should go fine and you should get BUILD SUCCESS. P.S: Thanks ThomasJungblut

Categories : Maven

ASP.NET TcpClient intranet
TcpClient has various overloads, you can give it a string containing the ip address or an IPAddress object. Also, use IPAddress ipAddress = IPAddress.Parse("192.168.1.12"); IPAddress does not contain a constructor that takes a string. http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.connect.aspx As for your transmission issue; disable firewalls. Try localhost first.

Categories : C#

Intranet Extranet authentication
You can check the IP address of the client computer and enable or disable pages based on that. Look at $_SERVER['REMOTE_ADDR']. If it's an address on your Intranet, enable or disable the page as appropriate. Similarly, you can enable or disable pages for Extranet visitors. You will still need to authenticate your visitors. There's no specific need for an SSL certificate, but it's the only reliable way to guarantee the security of password exchanges.

Categories : Apache

Intranet no login on Android
If you are looking to encode credentials into a URL (from loading your servers address this appears to be what you want) the correct format is; http://user:password@domain.com If this solves your issue, I would edit your post to hide your domain to stop your server getting hammered.

Categories : Android

IE8 Standards mode for intranet sites
You can send an HTTP header (or the equiv Meta tag) to force IE8, IE9, etc. or Edge rendering: <!-- Latest standards --> <meta http-equiv="X-UA-Compatible" content="IE=Edge"/> or a specific IE version... <!-- Standards (as IE8 handled them) --> <meta http-equiv="X-UA-Compatible" content="IE=8"/>

Categories : Internet Explorer

Is there a way to access an intranet web application over internet
VPN is the good way to do this. The process greatly depends on your internal network structure. And one has to set up a way-in first. Check out OpenVPN http://openvpn.net/

Categories : PHP

How should *intranet* REST API calls be secured?
Like anything else, it depends on the sensitivity of the data involved, and the level of risk vs. how much the organization wants to spend. Usually, using strongish SSL (https connection) is considered good enough. You may need to include an authentication mechanism, if you need to audit which System A submitted the request -- for this you could use any of: client cert, HTTP Auth (basic or digest), username/password as request parameters, IP-address mapping, API keys etc. For system->system calls, if the client system doesn't change (i.e. not a web browser or actively changing clientbase), you don't even need "real" certificates -- a strong self signed certificate is good enough, and because you distribute it to your client systems, they all know the source is valid without a 3rd party

Categories : Security

Intranet Usernames will have different string representing them
The are no properties that expose user names in the format "domainuser" so you need to do it your self, and for that, the SamAccountName property is the one to use. var username = "WIN-SPDEV\" + p.SamAccountName; Edit To clarify, this applies to search results from the Active Directory, so this will unify the way user names are displayed. Your Code will Become List<DomainContext> results = new List<DomainContext>(); using (var context = new PrincipalContext(ContextType.Domain, "WIN-SPDEV")) using (var searcher = new PrincipalSearcher(new UserPrincipal(context))) { var searchResults = searcher.FindAll(); foreach (Principal p in searchResults) { DomainContext dc = new DomainContext(); dc.DisplayName = p.DisplayName; dc.userGuid = p.UserPrincipalName; var username = "WIN-SP

Categories : Asp Net Mvc

Custom Roles for MVC Intranet Application
In one of my existing projects I get the principal per-request using the Application_AuthenticateRequestion() method in Global.asax.cs. The main choke-point is retrieving the User from the database, but this problem is overcome by data-caching the User object in memory behind the scenes. protected void Application_AuthenticateRequest(object sender, EventArgs e) { var authCookie = HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName]; if (authCookie != null) { var ticket = FormsAuthentication.Decrypt(authCookie.Value); FormsIdentity formsIdentity = new FormsIdentity(ticket); ClaimsIdentity claimsIdentity = new ClaimsIdentity(formsIdentity); EmailAddress emailAddress = new EmailAddress(ticket.Name); var user = this

Categories : Asp Net Mvc

Audit Log In portal
Yes, a Portlet Filter should suit your requirement. You can create a single filter and access the Portal state information from the request to gather what kind of a request was made. This way you can apply the same filter across all your Portlets, but record what kind of a request was made in each case. Remember you need to configure the filter for each Portlet, and apply it to specific life cycle phases. See: http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fcport_portlet_filters.html

Categories : JSF

URL to a portal application
When you go to place a portlet in a more permanent place in your Portal, you will create the page yourself rather than letting RAD generate something random for you. Part of the options for a page is a friendly URL. So you could specify what URL you want after the /wps/myportal/. Here is a link to some basic documentation about creating pages.

Categories : Misc

Parse portal URL
Apache URLEncodedUtils can do this for you. public static List<NameValuePair> parse(URI uri, String encoding) I would recommend using such a library in preference to regular expressions for this sort of this. There will be edge cases etc. which the Apache library has encountered previously and will be coded for.

Categories : Java

Really simple Django deployment for low-traffic intranet use
My suggestion would be to run something like nginx and then use uwsgi (or I guess Gunicorn) to serve the django site. You'll only have to set this up once, and then your application will scale nicely. Setting up nginx is quick and and easy, and there are a good number of tutorials around.

Categories : Django

how to access content from intranet site from mvc application?
In general, it is very bad security to impersonate a domain user when accessed via the internet. Chances are, if the intranet site was not made public it was made that way for a reason and you may be exposing company resources to attack by opening it up via a freely available website. A more safe approach would be to duplicate the logic of the intranet site you are looking to expose and meticulously merging its functionality onto a page in your external MVC app. It's more work, but it could potentially not cause you to be the reason hackers or script kiddies were able to steal valuable data. That being said, the way to impersonate a web request with authentication would be to make a series of HttpRequest objects, and storing the cookie information. This is how all of the authentication h

Categories : Asp Net

web based intranet video repository in C#, .Net MVC3
Thoughts on question 1 and 2 Two of the libraries that I know of are AVBlocks and FFlib.NET. FFlib.NET is a wrapper around FFMpeg Two options you have to files are on database (as blobs) and the file system. If you select the former, you will have the ability to have all meta data and content on the same store. But latter would be less complex and would be faster as you are directly loading data off the disk without having to go through IDataReader type of an interface (of course testing/benchmarking is needed)

Categories : Dotnet

clean way to identify if user from intranet or internet
Firstly, you can not use the Environment class to get information about the user making the request to your server. Environment accesses the local computer's environment, so you'll always get the server's details. Nothing in there is going to tell you thing one about the client. All client information available to the server will be in the Request object. If you use authentication on your website you can get the user to log in, then check the user's security details in System.Web.HttpContext.Current.Request.LogonUserIdentity for example. This still won't tell you where the client actually is however. Testing the user's login domain will only tell you if the user has authenticated against the domain, not whether the client is on your local network. If your website is accessible from

Categories : C#

Intranet Hosted and deployed Chrome Web Apps?
According to Google's docs it doesn't have to be on the store, but it does have to be hosted somewhere accessible to the box: Pre-installing via group policy Using policy to deploy an extension or Chrome web app is the easiest and most scalable method. This is the recommended method for pushing extensions,as it does not require the CRX file to be on the machine. It must simply be available at a given URL. To use this method, set the policy to "force install" the extension, as described here.

Categories : Google Chrome

Login Authentication using Active Directory in the Intranet...Possible?
Check this Post It uses Active Directory to authenticate site members on Intranet.

Categories : C#

Accessing PHP file on intranet application w/AJAX
/../includes/helpers.php means 'the file 'helpers.php' in the folder 'includes', which is situated one directory up from the root. Now that last part doesn't seem right. How can a directory exist one directory up from the (virtual) root of your website? Or: how could a browser reach that directory?

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.