Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all 8245 articles
Browse latest View live

several27 on "Developing wordpress fork"

$
0
0

Hi everyone,
I'm wordpress developer for about 4 years. I really enjoy using it and I believe that we as a community could bring it to completely different and what is more important higher level. The main idea of wordpress was to keep it simple and fast. However if anybody who is reading this was building website that will contain big number of posts, media, plugins etc probably force with problem of low performance of whole backend, and core stuff. In my opinion it is not problem with php performance, it is awsome programming language (and can be better now with Facebook hhvm). But let's keep it simple, it would take a lot of time to rewrite whole wordpress to some other programming language.
I think it is time for creating wordpress fork, that will merge core with some functionalities(that are currently brought by plugins), make things little bit more simple, object-oriented if needed, more flexible, and without weird 'junk' staff: legacy of earlier versions. Also I think that we could use js framework like angularjs for backend to make things even more fluid.

I really would love to make a team of developers, and create wordpress fork.

What you think about it guys? What's your ideas? Who is with me ? :)


gmurray96 on "Creating a Tumblr-like / Microblog into Website"

$
0
0

Looking for any suggestions or direction for turning my traditional blog into a Tumblr-like (micro) blog format. From the research I’ve done, it seems using Post Formats could be the best way to move forward. I realize there are SEO drawbacks to micro-posts, but apparently it can set it up so any short posts (videos, memes, links, quotes, etc…) could be preset as noindex posts, so only the longer posts (300+ words) are indexed. What do you think? Is using Post Formats the best way to move forward? Any other direction or suggestions much appreciated.

Luke Janicke on "How to customize "Insert Media" output?"

$
0
0

I want my editors to be able to use the default "Insert Media" feature but I want to customize the output. By default, "Insert Media" produces something like this:

[caption id="attachment_414" align="aligncenter" width="600"]<a href="http://www.theharbiner.com/?attachment_id=414" rel="attachment wp-att-414"><img src="http://www.theharbiner.com/media/2014/06/baskets-of-tea-1-600x397.jpg" alt="Baskets of Tea" width="600" height="397" class="size-medium wp-image-414" /></a> Varieties of tea on display and for purchase.[/caption]

Wow! That’s a lot. And it contains a mix of shortcode, hardcoded HTML and a lot of hard-coded attributes.

What I want the output to be is (for a single image):

[image id="414"]

Simple!

This would be easier for my editors (who don’t know HTML) and it’s future proof – I can regenerate images at different sizes and change HTML and attributes any time as I develop the theme. It also looks good alongside the Markdown that I’m making all my editors use.

I have already written the shortcode functions to output the desired HTML in my theme. What I need to do is filter the returned output of the actual "Insert Media" function in the post editor.

Is this possible? What is the filter to use?

Note: The answer is not img_caption_shortcode. That filter is for modifying the HTML output by the theme.

otti.steinhauer on "Detect Browser back-button"

$
0
0

Hello,
as far as I have got much help on this forum I will aks again my newest question.
In my new plugin I am programming a form in four steps. After the lat step evrything is finished and the user must not go back to the form. Everything is OK with the back-button on the site, but not with the back button of the browser.
So first I have to detect when the browser-back button is clicked and in this case either to enable this button or redirect to another page.
How can I test the Broser-buttons?
My plugin uses php and javascript.

Thanks

Ottilie

deeplyrootedimages on "Hack Help!"

$
0
0

I've been hacked apparently. Prophoto told me I needed to talk to godaddy, but also gave me a link to fix the problem (it didn't fix it). Godaddy said it's a wordpress problem so I have to talk to them. Please help me get my website back up!
Thanks!!

This is the error displayed (I replaced my theme but didn't work):

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/content/79/8884679/html/wp-content/themes/prophoto4/classes/util.php on line 598

enibbe on "Ecommerce multiple choice"

$
0
0

I am looking for a plugin or a modification of a plugin that I could use to sell products that has a list of options with multiple choices to choose before going to the checkpoint. E.g.

Team-A v Team-B,
Team-C v Team-D,
Team-E v Team-F,
Team-G v Team-H,
Team-I v Team-J,
Team-K v Team-L,
Team-M v Team-N,
Team-O v Team-P.

It could be different and need to be altered:

Team-A v Team-D,
Team-C v Team-B,
Team-E v Team-H,
Team-G v Team-F,
Team-I v Team-L,
Team-K v Team-J,
Team-M v Team-P,
Team-O v Team-N.

The feature that I am looking for in more details are:
- The minimum options to choose could be set.
- Each chose has a time limit, it will expire and deleted from the list.
- I could add/delete more chooses anytime.
- Set a price on how many options chosen.

I would appreciate help on this and thanks in advance.

Jax2 on "Trying to get a slide-down facebook share box on my posts"

$
0
0

Hi all,

I am currently using 2 small plugins to try and achieve my goal of making a slide-down facebook share box that users see when they scroll to the bottom of a post: WP-insert and End Page Slidebox.

With WP insert, I add the tags from end page slidebox ([epsb] [/epsb]) in the "after content" section. It works as it should displaying whatever I have between the tags. So far so good.

Now, the issue I am having is that I would like the box to show the image from the post, title, and a small snipet from the story.

I have tried to use <?php the_content() ?> as well as the_title() ...etc etc, in the code box, but because these only work in the loop, nothing is showing up.

Can anyone suggest how I might create the share box code so that the user gets a preview of what is being shared? It's kind of driving me crazy. The only thing I have managed so far is a small facebook share button, just the standard one, it's not what I'm looking for.

Thanks in advance!

leeheeman on "Access Plugin's UI From Frontend"

$
0
0

I have been looking around for a way to access the user interface of a plugin from the frontend of my website.

Normally, I would post any code and the website, but I really just need a push in the right direction. I have not found any documentation for how to do this specifically.

I can think of a few convoluted and resource consuming ways to do it, but I'd really like a simply way for users to access a particular plugin from the frontend.

I want to keep them out of the backend not for security reasons, but it's because I feel they would have a more seamless experience if they never had to go to the backend.


SFGolfer on "Access database outside of WordPress 3.9"

$
0
0

I have been using the code below in a custom .php file outside of WordPress. The code worked without any issues until upgrading to 3.9 or 3.9.1.

define( 'SHORTINIT', true );

require_once( $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-load.php' );

global $wpdb;
$tourney = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM database WHERE player_name='".$player."' And season='".$season."' And status='' ORDER BY date DESC", $null ), ARRAY_N );

Now this error appears:

Call to undefined function __() in /home1/public_html/blog/wp-includes/wp-db.php

What would be the proper method of querying a database outside of WordPress?

howelljs on "Wordpress plugin changes install directory when deleted and reinstalled"

$
0
0

THe wordpress add new plugins feature changes the install directory after it has been deleted and reinstalled. It started as my-plugin, then changed to my-plugin1, then changed again to my-plugin2. This occurred after some coding errors (my fault) and I used ftp to remove the files before zipping them and reinstalling them using the add new plugin feature. So here is the problem, where/when is the 1 or the 2 or the n being added to the directory name and how do I reset it? Is this stored in the database somewhere? I searched pretty hard for a solution and only found one reference to this problem on the stackoverflow website. I tried their solution, but, it didn't fix it. Any thoughts?

yk26 on "'You do not have sufficient permissions to access this page"

$
0
0

Hello All,

I have tried searching for the issue for about a day and after complete exhaust want someone to please rescue on this or some pointer to look into. It can be described as follows bullet points:

1) working on a plugin development and have admin permission and have checked the usermeta entry to be administrator and s:1:"1" as specified.
2) Have 4 pages added as under menu item on the side bar under my plugin menu and I am able to access these pages without worrying.
3) I have some href links on these pages which call other views that are created under my plugin's file structure. Any attempt to access these pages result in 'You do not have sufficient permissions to access this page'

Please suggest if there is any step I missed to perform to access view other than registered menu item views on a plugin.

Regards
A badly stuck user :(

xymalf on "Redux framework"

$
0
0

Does anybody have experience of using the Redux framework to develop an amazon plugin? Also where do you get the amazonAPI.PHP file from? How do you pass variable like amazon tags to the API?

PedroProtest on "wp_mail recipient"

$
0
0

I am new at this and seeking help, I'm really need a light at the end of the tunnel, so if you can help me, please do it! I will be very grateful!

The question is, what do I do to when someone fills out a form and send, wordpress sends this form to the existing users in the website, and filtered by location / service you choose in form?

It is possible to do something like this in wordpress? I quite understand html / css / javascript bases, and very little php. maybe that's the problem.

In my view I think it should be doing some modifications here and there ...

I found something similar here, but in my case, my group emails would have to be filtered by the parameters they chose the form.

I apologize if I'm not being clear, or if I'm asking for much, really needed was a guide to help me deal with these problems, but if you can solve this I will already be very happy :)

Greetings to all

wiresplus on "How do I redirect to another page after a short delay"

$
0
0

Hello,

I want to have a thankyou page, that redirects after a short pause.

The page id will be 432.

I tried to add the following 7 second delay/redirect

<?php if(is_page(432)){
<meta http-equiv="refresh" content="7;url=[homepage url]" />
}
?>

in page.php, but no good.

What should I be doing?

phyle5 on "Page-Template Duplicate issue."

$
0
0

I duplicated a page-template, lets say page.php to page2.php and inside the file renamed Template Name: page2 .

However when I create a page in wordpress using page2 teplate all the formating is gone!!
( Its like no css/js/jquery loaded, just like plain text)

?? What am I doing wrong?


matheushfm on "JQuery Lightbox doesn't work"

$
0
0

Hi There,

When I run the code offline using a HTML code and calling the JQuery Library, it works properly. However, when I try to implement it on my WordPress site, it simply doesn’t work.

1) I added the script code to the footer of my template (a)

2) I called the JQuery library on the header of my template (b) I also tried to test different combinations but I had no success.

3) The CSS classes were added to my template CSS file. (c)

4) I declared the class that start the instructions on the button ( the one I want to start the light box)

Could anyone help me to understand what could be wrong and how to solve it?

(a) Script added to the footer

<script>

	$(document).ready(function() {
		$('.lightbox').click(function() {
			$('.background-map-lightbox, .map-lightbox').animate({'opacity':'.60'}, 500, 'linear');
			$('.map-lightbox').animate({'opacity':'1'}, 500, 'linear');
			$('.background-map-lightbox, .map-lightbox').css('display','block');

		});

		$('.close-map-lightbox').click(function() {

			$('.map-lightbox, .background-map-lightbox').animate({'opacity':'.0'}, 500, 'linear', function() {
				$('.map-lightbox, .background-map-lightbox').css('display','none');

				});

		});

		$('.background-map-lightbox').click(function() {

			$('.map-lightbox, .background-map-lightbox').animate({'opacity':'.0'}, 500, 'linear', function() {
				$('.map-lightbox, .background-map-lightbox').css('display','none');

				});

		});

	});

</script>

(b)On the header of the template 

<?php wp_enqueue_script ("jquery");?> and <script src="<?php echo get_template_directory_uri(); ?>/js/jquery-1.11.1.min.js" type="text/javascript"></script>

(c) CSS

.lightbox {
	color:green;

}

.background-map-lightbox{
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
	background-color:#000000;
	opacity:.0;
	-moz-opacity:.0;
	filter:alpha (opacity=0);
	z-index:100;
	display:none;

}

.map-lightbox {
  background-color: #ffffff;
  border-left: 13px solid #eba096;
  border-radius: 22px;
  box-shadow: 2px 2px 2px #333333;
  color: black;
  display: none;
  height: 303px;
  left: 30%;
  padding: 20px;
  position: absolute;
  top: 20%;
  width: 540px;
  z-index: 101;
}

.close-map-lightbox {
	float:right;
	cursor:pointer;
	background-color:#a6d5b3;
	border:solid 1px #e6e6e6;
	width:25px;
	height:25px;
	border-radius:40px;
	color:#fff;
	font-family:"Open Sans";
	top:-27px;
	right:-27px;
	position:relative;
	text-align:center;

}

#map-ebook-title h1 {
  color: #8a8198;
  font-family: "Open Sans";
  font-size: 62px;
  font-style: italic;
  font-weight: bold;
  line-height: 43px;
  margin: 15px;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

#map-ebook-title h2 {
  color: #4d4d4d;
  font-family: "Open Sans Semibold";
  font-size: 23px;
  font-style: italic;
  font-weight: bold;
  line-height: 43px;
  margin: 30px 15px;
}

Thanks a lot

skyoyugi on "WordPress Login to look like GMail"

$
0
0

Hi guys,
I was wondering whether someone has found a way in which we can transform the WP login to behave like gmail login-when a user logs in and logs out, the next time they come back to use the same computer, it recognizes their username and displays something like "Welcome back user XXX. Please enter your password."

I envision this to help when I tick the remember password box. Any help will be heartily appreciated.

Hatul666 on "pass variables in wordpress"

$
0
0

I want to pass variables from single.php to sidebar.php

When the sidebar is called in the single.php code, it's written like this:

get_sidebar();

are the () for passing variables? how do I write it?
get_sidebar($parameter);
like this?
How do I call it in sidebar.php ?

Thank you.

nicgios on "New plugin configuration policy"

$
0
0

Hi all,

I wrote a set of functions and I want to package them as a plugin, but I have a problem.

Many functions calls a configuration function which stores some general variables (I avoided global variables) defined by user. Is a good way to create a configuration page for the user in order to define such variables? In this case, should the variables be stored in the database directly?

I'd like the user not to touch a function: better to configure a plugin with a proper page, isn't it?

Thanks for your help

burakakin on "how to add javascript:void(0); in main nav items"

$
0
0

Hello ,
I am a newbie in wp. I created my main menu but I cant use dropdowns correctly I am trying to convert :

<nav>
  <ul id="navigation">
    <li class="current_page_item"><a href="index.html"><span>Home</span></a></li>
    <li class="drop"><a href="javascript:void(0);"><span>Features</span></a>
  </ul>

I cant add js to href items until now I came up with the solution :
<?php wp_nav_menu( array('menu' => 'Main','menu_id'=>'navigation','link_before' => '<span>','link_after' => '</span>')); ?>

and in functions :

add_theme_support('nav-menus');
if(function_exists('register_nav_menus')){
	register_nav_menus(
		array(
			'main'=> 'Main Nav'
			)

can you help me to add js ?

Viewing all 8245 articles
Browse latest View live




Latest Images