It's Drupal Girl!

DrupalGirl Posts

Forced watermark for browser printing (When user has browser to not print background images)

This solution came in handy for web pages that displayed "unofficial" information that users could print out.

 

HTML

<div id="printDiv">
     <div id="background">
  <p id="bg-text">Unofficial</p>
    </div>

CSS

#bg-text
{
    color:lightgrey;
    opacity: 0.1;
    font-size:120px;
    transform:rotate(300deg);
    -webkit-transform:rotate(300deg);
}

PowerSchool Parent Portal Printable Un-Official Transcripts :) Using some DATs

Project Description: Allow parents to print out their student's unofficial transcript from the parent portal. Included a forced "Unofficial" watermark that the browser is forced to print.

What I used: DATs, CSS, HTML and Javascript.

The Code

<!DOCTYPE html>
<html>
<head>
    <style>
 

Concat Mom and Dad email columns in PowerSchool using LISTAGG in oracle

We used this to feed to our notification systems. (Absent notifications, Drills, Snow days, etc...)

The query:

SELECT s.dcid,
listagg(ea.EMAILADDRESS, ',')
WITHIN GROUP (ORDER BY s.dcid, ea.emailaddress) "Guardian_email"

FROM
STUDENTS s, STUDENTCONTACTASSOC sca, person p, PERSONEMAILADDRESSASSOC pea, EMAILADDRESS ea

Jquery and PowerSchool- If statement - show hidden fields

The below will target a div and make it appear and disappear depending on what is selected in another field.

~[wc:commonscripts]

<script>

 

$j(function($){

 $j("#ELStatusField").change(function() {

  if ($j(this).val() == "01" || $(this).val() == "06") {

    $j('div#AccessEllsDiv').show();

    $j('#AccessElls').attr('required', '');

    $j('#AccessElls').attr('data-error', 'This field is required.');

  } else {

    $j('#AccessEllsDiv').hide();

    $j('#AccessElls').val("");

Add custom fields to PowerSchool

1. add custom fields

System> custom fields/ screen>Student Fields Click new.

Add new field to table

system> Page and data management> Manage Database Extentions>

Select table to extend> Usually "Students"

Select "Advanced Extentions"

Next

Select Table you want extention/field to go into 

next

Then click next again

Step 4 is where you ad your newly created field

Click "add"

Migrate Data from: Select your fields from the drop down

you can't make changes to this skype meeting because it has some properties that are not valid. if changes are necessary, please

This error,

You can't make changes to this Skype Meeting because it has some properties that are not valid. If changes are necessary, please delete this meeting and reschedule.

 

What fixed it for our user:

Make sure Skype for Business is running! 

Drupal Quiz Module- Export Points instead of text answers for multiple choice questions.

This view will allow you to export the "Point_awarded" field.

View needs to look exactly like below based off the "results" view in Quiz Module under Quiz tab> Results button click the sprocket.

 

Below is the "View" view (haha)  

 

Drupal 7 Block that displays specific field belonging to displaying node using Views

I used this to display downloadable files that belonged to the node displaying. 

 

Add Contextual Filter

Block written into my template

 

Drupal 7- My WYSIWYG text Editor disappeared! When I go back to edit content in body field!

This drove me crazy.  Check the text in your body field, or whatever text field and see if you have the word "select" in your content text.  Sometimes it identifies it as a SQL injection.  Use a different word than "select" in your text.  
Not sure if there's a work around but I use a synonym for it in my content.  

 

Joomla 2.5 and ReCaptcha v1 - March 31, 2018 API retired

I have an inherited Joomla 2.5 site that the company if not ready to migrate to Joomla 3.  As of March 31, 2018 Recaptcha v1 no longer works. The API has been retired.  

Joomla 2.5 does not run recaptcha v2  without a work around. (Joomla 3 uses v2)

 

Here my work around if your Joomla 2.5 site is getting nailed with spam.

Captcha Q&A

https://extensions.joomla.org/extensions/extension/access-a-security/cap...

Drupal 7 Views Group Filters for sorting Webform Data! Yeay! -Drupal Girl

I could really find any clear direction on how to do this anywhere so here you go: 

I am assuming you know how to create a view. 

Groups filters in views Drupal 7 for webforms

 

Here's an overview of the view completed:

Stop Drupal 7 from banning friendly IPs - Drupal 7 IP Blocked

Drupal will block a user's IP if too many attemps are made to access the Drupal 7 site within a set amount of time.

 

To change this default setting (5 times) add the following lines to your settings.php file.

$conf['user_failed_login_user_limit'] = PHP_INT_MAX;
$conf['user_failed_login_user_window'] = 5;

Good replacement for Facebook Autopost- Drupal 7

First create the rss feed in Drupal. I used views to do it:

my path is:  /news/rss.xml

 

 

 

Anchor links do not scroll in chrome- Drupal 7 and Chrome

Anchor tags must look like the below for Chrome to reconginize them and scroll.  (Need to have the <p> or <div> tag, the title should go between the <a> tags.)

Disable a field in the User "Edit" page. Drupal 7 Hook alter and custom user registration fields.

I need to allow users to add information during registration but not allow them to access those fields to edit after the new user account was saved. (Data collection project, if they went into their profiles and changed that data it would mess up our numbers.)

Here's the Hook alter code. :)

Add Drupal 7 user role to a user when they complete a quiz using Quiz and Rules Modules

What I needed:

I needed a rule that assigned a user role to a user after they completed a certain quiz developed in the quiz module.  The reasoning behind adding this new role was we wanted users to complete one quiz before having access to the rest of the quizes on the site.

After researching like crazy here's what I came up with:

Event: Drupal is initialing

Condition: Check Path (In the Path section)

Add HTML Tags to Webform Labels - Drupal 7_ drupal girl

I am sure a lot of people run into this issue.  Allowing html tags on the "label" field in webform form components to change part of the text to bold or other font formats. 

After hours of research on the web... here is the solution... and of course it is crazy easy!

 

Add

$conf['webform_allowed_tags'] = array('a', 'em', 'strong', 'code', 'img', 'ul', 'li', 'u');    

to your setting.php located here > sites/default /

 

Delete Office365 User's Team Site (Group) using SP Powershell SharePoint Online 2017- Drupal Girl

 So there 's a new Group function on SharePoint Online is built in with Team Sites and also has an overlap with exchange online.

Actually I don't know if it's new or not but it's new to me.  Any ways... these sites are notoriously complicated to delete.

Here's an easy way! 

Make sure you have SharePoint Online Powershell.  You can download it here> https://go.microsoft.com/fwlink/p/?LinkId=255251

Redirect Webform based on user's selection upon submit. No code (kind of) necessary. Drupal 7 webform redirect - Drupal Girl

This is what I needed and I mostly pieced it together by reading a few different solutions of forums and what not.

First in your webform you want to make sure your option in your option list have keys and you know what they are. 

1.

Step one

 

2.

Step 2

 

 

Down and dirty work around for Drupal 7 Node Export for access denied message- Drupal Girl

I'm on a liquid web server that has great security... But right now I don't have time to deal with all the apache mod stuff... I will do it later but for now.  I needed my Drupal 7 webforms exported and imported to a different site.  Both sites are on the same VPS :(

The only option to export the webform from the one site was to copy and paste the code... (download gave me the same permissions message)    But!  The other site wouldn't import the pasted code because it viewed it as a code injection... so the LiquidWeb VPS shut the import down and was mean to me... 

Pages