Jump to content


Photo
Resolved

Using URL in boxes and feature with Qtranslate



  • This topic is locked This topic is locked
34 replies to this topic

#21 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 10 October 2012 - 04:59 PM

so sorry....

and


#22 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 10 October 2012 - 05:01 PM

OK so what is the link? I cant actually see it, the feature link that is.

#23 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 10 October 2012 - 05:13 PM

feature: http://www.americasb...ws-oil-mandate/
same for the box of course

#24 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 10 October 2012 - 06:50 PM

The script is adding an extra / into the url either remove it in the script, or remove it from the url in the feature.

#25 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 10 October 2012 - 08:13 PM

Almost there.
I erased directly in the link and the feature is working perfectly. Thank you so much.
The boxes though still don't work, even after I took the extre / from the link like with the features.

#26 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 10 October 2012 - 08:14 PM

That filter ONLY works for the feature link.

#27 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 10 October 2012 - 08:36 PM

Then could I replace the word feature for box in your code and put it in the right place?

#28 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 11 October 2012 - 08:48 AM

well no, my shortcut didn't work at all. I tried putting in the code in the platformpro/sections/boxes.php and naturally it didn't work. nothing happened, I'm assuming because the code is written for 'functions' in the feature code.
I don't know how to write a code nor am I sure where I would put it.
Please help

#29 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 16 October 2012 - 06:22 PM

Dear PagelinePro forum: as you've probably noticed by now, because I've alerted you to do this, there are two similar posts addressing this same issue described above. I'm not quite sure how to proceed if the moderators and PagelinesPro people do not offer a solution. The PagelinesPro team simply decided not to offer further support. If I'm not going to get a response, would you be so kind as to advice me where I should turn to get support for the purchased PagelinePro product?

#30 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 16 October 2012 - 06:59 PM

Sorry the Pros could not help you out, I did not receive any questions about it from them.

Ive updated the filter, no time to test

 
function add_lang_features($metadata, $object_id, $meta_key, $single){
$key = $meta_key;

if ( 'feature-link-url' != $key && 'the_box_icon_link' != $key )
  return $metadata;

if ( ! is_admin() && function_exists( 'qtrans_getLanguage' ) ) {
  remove_filter( 'get_post_metadata', 'add_lang_features', 999, 4 );
  $data = get_post_meta( $object_id, $key );
  $link = sprintf( '%s/?lang=%s', $data[0], qtrans_getLanguage() );
  add_filter('get_post_metadata', 'add_lang_features', 999, 4);
  return $link;
}
	 return $metadata;
}
add_filter('get_post_metadata', 'add_lang_features', 999, 4);


#31 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 17 October 2012 - 07:24 AM

Thanks for coming back simon. I inserted into functions in platformbase, but it crashed my site. This is the message i got:

Fatal error: Cannot redeclare add_lang_features() (previously declared in /home/andres11/public_html/americasblindspot.com/wp-content/themes/platformbase/functions.php:103) in /home/andres11/public_html/americasblindspot.com/wp-content/themes/platformbase/functions.php on line 133

#32 gcoppola7

gcoppola7

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • Country: Country Flag

Posted 17 October 2012 - 07:47 AM

I'm sorry Simon. My mistake. I just added the code, instead of replacing the previous one, which is what I had to do. I've tested it and it works perfectly. Problem resolved!!!

thanks so much!

#33 Danny

Danny

    Is Awesome!

  • Moderators
  • 17124 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 17 October 2012 - 09:16 AM

The topic was marked as resolved.

#34 yoni

yoni

    Newbie

  • Members
  • 8 posts
  • Country: Country Flag

Posted 31 July 2013 - 09:02 PM

Hi,

 

I tried your code but it doesn't seem to be doing something, I guess I didn't put it in the right place...

 

I am using a child theme (This child theme requires its parent theme, PageLines Framework.)

 

I also opened an other thread on http://forum.pagelin...xes-link-issue/ since this issue was closed. 

 

could you give me a hand? thank you



#35 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 02 August 2013 - 08:57 PM

Yoni, this topic is marked resolved.  Please don't post replies on resolved topics.  They won't be answered.







Also tagged with one or more of these keywords: Resolved